0
secret = "gatos"

f = '*' * len(secret)

print(f)

print(f.replace(f[2], "t", ))

I realized that this "error" happens because I have strings that are the same, but I don't want them to change for replace to do what I want.

I want replace to change exactly in the position I want.

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135

0 Answers0