Extracting individual numbers from string (python)


I have a long code (545362783) and would like to add them together and multiply them. (1*5)+(2*4)+(3*5)+(4*3)+(5*6) etc. Is there a simple solution to get them as a integer so I could use these in math. Many thanks!
 New contributor

Post a Comment

0 Comments