Write a function in python to find the sum of the cube of elements in a list. The list is received as an argument to the function, in turn, the function must return the sum. Write the main function which invokes the above function.
Source Code
def sum(numbers):
total = 0
for number in numbers:
total += number**3
return total
def main():
numbers = [3,6,4,8,9]
s = sum(numbers)
print(s)
main()
Output
1548