My Code
data = input("Enter your numbers: ").split(", ")
print("list: ", data)
q = sum(data)
print("Sum: ", q)
Input
7,45,78,3
Output
['7,45,78,3']
Traceback
the error is in line 3 (q = sum(data)
) and it says :
TypeError: unsupported operand type(s) for +: 'int' and 'str'
I can not go farther to get Average . what should I do now ?