zjfz-2019-s439462/intro/Task107.py

13 lines
234 B
Python

def list_cubed(l: list) -> object:
result = 0
if not l:
return result
else:
length = len(l)
while length > 0:
result += pow(l[length - 1], 3)
length -= 1
return result