vendredi 6 décembre 2019

How can I modify specific line in a text file? (python)

It's my assignment, I have been trying to write a program to change detail in a text file by using python, but I got trouble in the last input part, the result is when I going to select which detail I'm going to modify, it didn't run fine, what am I wrong? I hope my English is fine as well, thank you!

Here's the codes with problems(I tried to post the codes here but I failed, maybe it is too long or I made some type mistakes):

the python file

the text file looks like

Aucun commentaire:

Enregistrer un commentaire