For the code below I am not replacing anything in the old txt. I am expecting it returns: "Where did my vowels go?"
def uncensor(txt, vowels):
c = 0
for a in txt:
if a == '*':
txt.replace('*', vowels[c], 1)
c=c+1
return txt
uncensor("Wh*r* d*d my v*w*ls g*?", "eeioeo")
However, I can replace letter if I do:
txt = 'Wh*r* d*d my v*w*ls g*?'
vowels = 'eeioeo'
txt.replace('*', vowels[0],1)
Where am I doing wrong?