how to get the sum of the number in a list in python code example Example: python sum of list >>> list = [1, 2, 3] >>> sum(list) 6