ProblemStatment.py
Anonymous
python
10/13/2024 3:46 AM
248 B
28
Indexable
def list_sum(lst):
s = 0
for elem in lst:
s += elem
return s
print(list_sum([5, 4, 3])) #Returns 12 :)
print(list_sum(5)) #Returns TypeError :(Editor is loading...
Leave a Comment