When I do the following:
def encrypt(string):
str(string).replace('0', 'A')
return(string)
encrypt(000)
Only 0
comes out as the output.
What I want to do is replace all 0
s with an A
to test an encryption program I am going to make. The output I want is AAA
.
So why doesn't it work when I try to replace 0
with A
?