I mean when giving a string '1+2*3*4+5-1+6/2'
will give me the result 32 without using eval every time I searched it gave me answers with eval.
Every time I try and put in the multiply it wont work even if I put it on a different for to work first and the Len was with small letter but it didn't let me upload the question so I wrote it with upper letter:
def compute(string):
total = 0
for index in range(Len(string)):
if string[index] == '+':
total += int(string[index+1])
print total
if string[index] == '-':
total -=int(string[index+1])
print total