I need to replace specific letters with other specific letters, so here's an example of a desired output and input:
Input: QWe RtYy
Output: ABc DeFf
I tried using string.replace
but I realized that it would be very long for each uppercase and lowercase letter and what I tried didn't work properly, because only the last letter would change.
Extract of my code:
string = input("Enter text.\n")
NewString = string.replace("q", "a")
NewString = string.replace("Q", "A")
NewString = string.replace("w", "b")
NewString = string.replace("W", "B")
print(NewString)
But when I write "q Q w W"
I get "q Q w B"
instead of "a A b B"
.