Aug-27-2018, 05:18 AM
I am trying to sum up the elements of an integer using python split join
Here is my code,
-----------------------
a='1234'
b=list(a)
c='+'.join(b)
print© ##output- 1+2+3+4
-------------------------------------
How to get the sum of all the elements
Here is my code,
-----------------------
a='1234'
b=list(a)
c='+'.join(b)
print© ##output- 1+2+3+4
-------------------------------------
How to get the sum of all the elements