从Python中删除列表中的所有逗号

Jos*_*uez 1 python

我的问题:我想在这个字符串中添加所有数字'1.14,2.14,3.14,4.14'但是逗号导致我的sum函数无法正常工作.
我认为使用条带功能可以解决我的问题,但似乎仍然有一些我缺少或不太了解.

total = 0
for c in '1.14,2.14,3.14'.strip(","):
    total = total + float(c)
print total
Run Code Online (Sandbox Code Playgroud)

我已经搜索了如何从字符串中删除逗号,但我只找到了有关如何从字符串的开头或结尾删除逗号的信息.

附加信息:Python 2.7

Dan*_*ocq 7

我会使用以下内容:

# Get an array of numbers
numbers = map(float, '1,2,3,4'.split(','))

# Now get the sum
total = sum(numbers)
Run Code Online (Sandbox Code Playgroud)