Python Programming - Data Types - Discussion
Discussion Forum : Data Types - General Questions (Q.No. 56)
56.
What is the output of the following code snippet?
my_list = [1, 2, 3, 4, 5]
result = sum(my_list)
print(result)
Answer: Option
Explanation:
The
sum()
function calculates the sum of all elements in a list.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers