输入用input然后你按照逗号分割字符串list1=input().split(',')这里面就是你要的
s = input() b=[int(i) for i in s.split(',')] print(sum(b))