I need help to replace a content in a list, but at a certain interval.
Lets say I have a list with this data:
a = ["word word word" , "word data word"]
And I want to replace word that is in character [9:13]
for data so the output of the list would be this:
b = ["word word data" , "word data data"]
How could I do it in python? I've only found solutions that would replace everything that is named as word like the command replace.
Edit: I guess i tried to post a lighter version of my problem, I need to replace an invalid data for a valid data, but when I do it i can't risk replacing similar data that belongs there.
Replacing word for data in character [9:13]
a = ["word word word" , "word data othr" , "word, data word"]
Output should be:
b = ["word word data" , "word data othr" , "word, data data"]