python - Cannot get variable.replace working properly -


I am trying to replace a string with a new string in the python file and it will permanently replace the new string Have to write When I run the following script it removes part of the string and not all. The file has a string:

  self.id = "027FC8EBC2D1"  

and I have a script to replace the string:

Open (" Test.py "," r + ") for the line in open =" open "(open_example) > Simulate ;-) "True In-Place Replacement" on Text Files with Python

The comma print statement at the end is to avoid adding another new line at the end (since every Line ends with a new line already!


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -