I've searched a bit for this, but haven't stumbled upon anything that is useful for me yet. My question is pretty simple; I have the following script:
inputFile = file('C:/Documents and Settings/example.txt', 'r')
data = inputFile.read( )
inputFile.close ()
data = data.replace('t his x something', 'that x something else')
outputFile = file ('C:/Documents and Settings/example.txt', 'w')
outputFile.writ e(data)
outputFile.clos e()
Where x is an unknown decimal typically with three digits (e.g. 145.531) whose exact value is not predictable.
How do I implement x?
Thanks in advance.
inputFile = file('C:/Documents and Settings/example.txt', 'r')
data = inputFile.read( )
inputFile.close ()
data = data.replace('t his x something', 'that x something else')
outputFile = file ('C:/Documents and Settings/example.txt', 'w')
outputFile.writ e(data)
outputFile.clos e()
Where x is an unknown decimal typically with three digits (e.g. 145.531) whose exact value is not predictable.
How do I implement x?
Thanks in advance.
Comment