Miscellany
public text v1 · immutable def proccessCommand(cmd):
returnthis=[]
tmpstr=""+cmd
loc=0
for char in cmd:
if char in "+−*/":
returnthis.append(tmpstr[:loc-1])
returnthis.append(tmpstr[loc-1:loc]
tmpstr=tmpstr[:loc]
loc=0
else:
loc++
return returnthis
i get this error:
File "calc3.py", line 97
tmpstr=tmpstr[:loc]
^
SyntaxError: invalid syntax
when i comment out that line i get this error:
File "calc3.py", line 98
loc=0
^
SyntaxError: invalid syntax