I try to delete from text file those characters '{a}' '{b}' ... and so on (I have 250 curly braces in the text file) using this code:
# -*- 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
because the letters change in every curly brackets i used asterisk in the,
but after i run this code nothing change in the text file:
>>> ================================ RESTART ================================
>>>
>>>
i red:
but didn't found my solution.