My issue: I\'d like to add all the digits in this string \'1.14,2.14,3.14,4.14\' but the commas are causing my sum function to not work correctly. I figured
\'1.14,2.14,3.14,4.14\'
I would use the following:
# Get an array of numbers numbers = map(float, '1,2,3,4'.split(',')) # Now get the sum total = sum(numbers)