I am making my own substitution cipher with python, and am trying to use the replace function. It seems as if it does not work though...
print("Scylla\n\n")
w = input("Encode (E) or Decode (D)?\n\n")
x = str(input("What is the message?\n\n"))
y = str(x.upper())
if w == "E":
for char in y:
y.replace("A", "N")
y.replace("B", "O")
y.replace("C", "P")
y.replace("D", "Q")
y.replace("E", "R")
y.replace("F", "S")
y.replace("G", "T")
y.replace("H", "U")
y.replace("I", "V")
y.replace("J", "W")
y.replace("K", "X")
y.replace("L", "Y")
y.replace("M", "Z")
y.replace("N", "A")
y.replace("O", "B")
y.replace("P", "C")
y.replace("Q", "D")
y.replace("R", "E")
y.replace("S", "F")
y.replace("T", "G")
y.replace("U", "H")
y.replace("V", "I")
y.replace("W", "J")
y.replace("X", "K")
y.replace("Y", "L")
y.replace("Z", "M")
print(y)
But all it does is print the phrase input in caps. What am I doing wrong?