I have a problem. when I print each members of list which is I replaced, it works.
but when I tried to print whole list, the member I replaced isn't changed.
even I already check by printing each members of the list.
I'm from Asia, so maybe you confused what I meant.
so I comment on the line where I stuck to.
Why does this happen? Why does it not change?
Is this issue about memory structure?
I really need your help guys.
def censor(text, word): ary=text.split() for member in ary: if member==word: member="*"*len(word) print member # *****\n my\n load\n print ary # [hello', 'my', 'load'] censor("hello my load", "hello")