How can I make this:
a = '3,3,3,3'
b = a.replace(',','+')
print(b)
Have the output of 12? I want the math inside the variable to be solved.
How can I make this:
a = '3,3,3,3'
b = a.replace(',','+')
print(b)
Have the output of 12? I want the math inside the variable to be solved.
a = '3,3,3,3'
b = [int(el) for el in a.split(",")]
print(sum(b))
What is going on in the code: