Hello everyone, I want to develop a script that will replace a letter typed by another one, so it would look like a = e, b = f.
I spent some time trying to create an algorithm for this function but the interpreter only replaced one letter at a time, in case I would like to do this for the whole sentence.
y = []
x = raw_input('reading: ')
print(x)
for i in x:
if (x) == 'a':
x = str('e')
y.append(str('e'[0]))
if (x) == 'b':
x = str('f')
y.append(str('f'[1]))
if (x) == 'c':
x = 'g'
y.append(x[2])
if (x) == 'd':
x = 'h'
y.append(x[3])
if x == 'e':
above a piece of code. I know there are better ways but I'm still a beginner .. I was hesitant to use the while or for, I ask you to orient me.