I am trying to convert the string str1 to a list of numbers so that I could sum them up. First I use the split() function to make sense of the numbers in str1, I cast the string into a list (lista) and after that I use the map() function in order to convert the strings in the new list to integers:
str1="13,22,32,4,5"
str2=str1.split()
lista=list(str2)
lista=map(int,lista)
print sum(lista)
For some reason I get the following error message: "ValueError: invalid literal for int() with base 10: '13,22,32,4,5'"