0
How can we add the numbers in list????????
list = ["4","96","47","56"] How can we add the number present in the list and we did not know the value of them
4 Answers
+ 4
Kavya Mittal Two approaches to add the Number present in the list
list = [2, 4, 5]
print(sum(list))
sum = 0
for i in list:
sum += i
print(sum)
+ 1
list= ["4", "96", "47", "56"]
if we wanna add 6 to a list
list.append("6")
Result:
list= ["4", "96", "47", "56" ,"6"]
+ 1
Muhammadđ:-) the question how to add numbers in list not add numbers to list
+ 1
Thanksđđ