How do you calculate the sum of a list in Python?

This question was previously asked in
OSSC Junior Stenographer, Junior Typist (Prelims) Official Paper (Held On: 09 Feb, 2025)
View all OSSC Odisha Junior Stenographer Papers >
  1. sum() 
  2. np.add()
  3. np.sum()
  4. math.sum()

Answer (Detailed Solution Below)

Option 1 : sum() 
Free
OSSC Junior Stenographer, Store Keeper, Junior Clerk Full Test 1
2.2 K Users
150 Questions 150 Marks 150 Mins

Detailed Solution

Download Solution PDF

The correct answer is sum()

Key Points

  • In Python, you calculate the sum of a list using the built-in sum() function.
  • Pass the list as an argument, like sum(my_list). It iterates over the elements, adding them together, and returns the total.
  • This method is efficient, concise, and works with numbers in the list.
Latest OSSC Odisha Junior Stenographer Updates

Last updated on May 16, 2025

-> The OSSC Junior Stenographer Mains Merit List has been released on 16th May 2025.

-> The Mains Written Examination 2024 was held on 12th April 2025.

->Earlier, OSSC Junior Stenographer 2025 Notification was released for 67 stenographer vacancies.

->The application window is open from 4th April 2025 till 3rd May 2025.

-> Candidates must go through the OSSC Odisha Junior Stenographer Previous Year Papers to understand the trend of the exam. 

Get Free Access Now
Hot Links: teen patti winner teen patti real cash apk teen patti master list online teen patti real money teen patti wink