Edited as per requirements. Let know if it works:-
def add_from_one_again(st):
return sum([int(i*(i+1)/2) for i in st])
print(add_from_one_again([16,12,89]))
4
solved Defining While Loop Functions With a List Containing Digits
Edited as per requirements. Let know if it works:-
def add_from_one_again(st):
return sum([int(i*(i+1)/2) for i in st])
print(add_from_one_again([16,12,89]))
4
solved Defining While Loop Functions With a List Containing Digits