mylist = int(raw_input(\'Enter your list: \'))
total = 0
for number in mylist:
total += number
print \"The sum of the numbers is:\", total
Correct way of doing the same is:
separator = " " #Define the separator by which you are separating the input integers.
# 1,2,3,4 => separator = ","
# 1, 2, 3, 4 => separator = ", "
# 1 2 3 4 => separator = " "
mylist = map(int, raw_input("Enter your list : ").split(separator))
print "The sum of numbers is: "+str(sum(mylist))
To find the sum you need to convert the space separated characters into int
individually as done above using map function.