Hi
I want to create a script that substitutes each full stop character (which represents the placement of a vowel) with all possible combinations of vowels.
However, for this I would expect 25 different combinations. Such as 'cattla', 'cattle' and so on. I've tried putting this into nested loops, but I need to make it run when there are any given number of "." characters that need replacing.
Can anyone make a suggestion please. I'm in loop hell!
Thanks
I want to create a script that substitutes each full stop character (which represents the placement of a vowel) with all possible combinations of vowels.
Code:
>>> word = "c.ttl." >>> for l in vowels: word.replace(".", l) 'cattla' 'cettle' 'cittli' 'cottlo' 'cuttlu'
Can anyone make a suggestion please. I'm in loop hell!
Thanks
Comment