sum of list upto element i python code example Example: sum up list python b = [1,2,3] a = sum(b) # 6