zjfz-2019-s439462/intro/Task107.py

13 lines
234 B
Python
Raw Normal View History

2020-01-12 14:35:16 +01:00
def list_cubed(l: list) -> object:
result = 0
2020-01-12 14:35:16 +01:00
if not l:
return result
else:
length = len(l)
while length > 0:
result += pow(l[length - 1], 3)
length -= 1
return result