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

2nd Jun 2020, 7:24 AM
Kavya Mittal
Kavya Mittal - avatar
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)
2nd Jun 2020, 7:28 AM
A͢J
A͢J - avatar
+ 1
list= ["4", "96", "47", "56"] if we wanna add 6 to a list list.append("6") Result: list= ["4", "96", "47", "56" ,"6"]
2nd Jun 2020, 7:32 AM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 1
Muhammad🏆:-) the question how to add numbers in list not add numbers to list
2nd Jun 2020, 8:18 AM
Abhay
Abhay - avatar
+ 1
Thanks😊😊
2nd Jun 2020, 10:01 AM
Kavya Mittal
Kavya Mittal - avatar