I am a beginner in python an am currently struggling with something:
I want to make a couple of changes in a single string. Is it possible to use a single asterisk sign (*), as a replacement-joker for a couple of characters? For example I have a string:
string1 = "The new year is about to become an old year"
And I want to use this pattern for finding:
find:
*year*year*
replace it with:
*century*one*
Which will result in:
string1 = "The new century is about to become an old one"
Meaning "*" character will replace all those characters between, and before the "year" and "year" words. Is that possible?