[Solved] Why can’t I return the modified str_func function back to the main function?


test="qwertyuiopasdfghjklzxcvbnm"

def changestring(string):
    for x in 'aeiou':
        string = string.replace(x, '*')
    return string

changestring(test)
'qw*rty***p*sdfghjklzxcvbnm'

Is this what you are trying to do?

5

solved Why can’t I return the modified str_func function back to the main function?