s = open("equation2.txt","r").read() s=s.replace("\\","").replace("[","(").replace("]",")").lower().replace("\n","") import re s = re.sub("(?