[ad_1]
You can use regex. Here is an example:
import re
s="welcome"
new_s = re.sub('([aeiou])', '\g<1>p\g<1>', s)
print(new_s)
> wepelcopomepe
2
[ad_2]
solved Python inserting characters in strings next to a specefic letters
[ad_1]
You can use regex. Here is an example:
import re
s="welcome"
new_s = re.sub('([aeiou])', '\g<1>p\g<1>', s)
print(new_s)
> wepelcopomepe
2
[ad_2]
solved Python inserting characters in strings next to a specefic letters