- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# How to find sum a list of numbers in Python?

Python's built-in function sum() returns sum of numbers in an iterable object such as list or tuple. It takes two arguments, initial value which is optional and 0 by default and iterable object

## Example

>>> l1=[10,20,30,40,50] >>> ttl=sum(l1) >>> ttl 150 >>> ttl=sum(range(10)) >>> ttl 45

- Related Questions & Answers
- Program to find sum of widths of all subsequences of list of numbers in Python
- Python program to find Cumulative sum of a list
- How to Find the Sum of Natural Numbers using Python?
- Program to find kpr sum for all queries for a given list of numbers in Python
- How to Find Sum of Natural Numbers Using Recursion in Python?
- How to find the greatest number in a list of numbers in Python?
- Python program to find sum of elements in list
- Program to find maximum sum of multiplied numbers in Python
- Program to find missing numbers from two list of numbers in Python
- Find groups of strictly increasing numbers in a list in Python
- Find sum of elements in list in Python program
- Program to find sum of first N odd numbers in Python
- Program to find largest sum of non-adjacent elements of a list in Python
- Program to find number of arithmetic sequences from a list of numbers in Python?
- Program to find number of arithmetic subsequences from a list of numbers in Python?

Advertisements