12 lines
148 B
Python
12 lines
148 B
Python
def list_cubed(l: list) -> object:
|
|
if not l:
|
|
return 0
|
|
|
|
sum = 0
|
|
|
|
for i in range(l):
|
|
sum = sum + (i*i*i)
|
|
|
|
return sum
|
|
|