
Brandon C. answered 02/02/23
Senior Software Engineer with University Computer Science Background
input = '90,67,87,102,77,80'
print(sum(map(int, input.split(','))))
We split the string on commas, which results in a list of strings that we want to turn into numbers. Then we map over that list by applying the int function to each string. This results in a new list of integers that we want to get the sum of. Finally we get the summation of every element In our list of numbers, and print out the result.