Edit JS code with Python
I am going to edit a code in JavaScript with Python using a template, but the code dont work, I do a example for append here. I have two documents: "Test.txt" and "Test.py" at same folder. The content "Test.txt" is: Prueba = new Trabajador("Sujeto de Prueba", 15, 1000, "7069"); And the Python code is: Prueba = open("Test.txt","r") Plantilla = Prueba.read() Prueba.close() print(Plantilla) Plantilla.replace("(\"Sujeto de Prueba\", 15, 1000, \"7069\");","(\"Carolina\", 20, 1500, \"0000\");") print("/////////////////////////////////////////////////////////////////////////////////////////////////") print(Plantilla) but when i execute the code the exit is this: Prueba = new Trabajador("Sujeto de Prueba", 15, 1000, "7069"); ///////////////////////////////////////////////////////////////////////////////////////////////// Prueba = new Trabajador("Sujeto de Prueba", 15, 1000, "7069"); What am I doing wrong? PD: Sorry for my english, i am learning.