Expand|Select|Wrap|Line Numbers
- # -*- coding: cp1255 -*-
- import sys,codecs,string
- reload(sys)
- sys.setdefaultencoding('utf8')
- root = r"G:\desktop\y\test2.txt"
- x = open(root)
- s=x.read().replace('{*}','').replace('-','')
- x.close()
- x=open(root,"w")
- x.write(s)
- x.close
but after i run this code nothing change in the text file:
>>> ================================ RESTART ================================
>>>
>>>