Q. What will be the output of the following code snippet?
Code:
a = [1, 2, 3, 4, 5] sum = 0 for ele in a: sum += ele print(sum)
β
Correct Answer: (A)
15
a = [1, 2, 3, 4, 5] sum = 0 for ele in a: sum += ele print(sum)
You must be Logged in to update hint/solution