I have a python code creating text file. In that I have certain key value pairs format of output file in which based on if condition i would like to replace the values.
Here is the output file that gets generated now,
name#Robin#Profession#Sales#Location#London#NickName#Robin# Birthplace#Swedan#Graduated#yes#MaritalStatus#Single#Studies#Mphil\DGO#WorkStatus#LiveOn
So this is the output file in this i want to specifically replace the BirthPlace London value to some other value in the output file. Like if birthplace is London or newyork replace to Onsite or If Birthplace is some other value then the same value which gets generated should be in the output file. I also wanted to remove the Mphil\ and get only the DGO gets printed.
How can i do the same in python 3.8 and resolve it?
Aucun commentaire:
Enregistrer un commentaire