HEY! -- replace multiple keywords (bit more complicated)
I posted a thread previously on replacements for a keyword, but the suggestions that were given were great but didnt do the job.... would love any more suggestions to crack the mystery!
the previous example i was given in my other thread was this...
>>> t = 'I love cheese; cheese is my favourite besides melted cheese.'
>>> t.replace ('cheese', 'shredded gorgonzola', 1)
>>>'I love shredded gorgonzola; cheese is my favourite besides shredded cheese.'
Awesome, solution but I want to add a bit more complication to the problem. This solution only replaces 1 keyword - the first 'cheese'. what if i want to change the next to 'cheese' to different words. i.e i want my result to be the following:
>>>'I love shredded gorgonzola; bree is my favourite besides camenbert.'
so although all the words are the same I want to change them to all different words... Hope that makes sense.
Thanks buddy's!!!! Hope we can figure this crazy problem out!!! PLEASE PLEASE please reply to this thread with any suggestions... even if it doesnt completely solve the problem... ideas on what could be involved in the solution would even help....
thanksss!!!!!