PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
l= "Hello World".lower () # string
# example input: "Hello World"
# replacing each letter in the string with corresponding letter in a backwards version of the alphabet
for i in l:
if ord(i) <=122 and ord(i)>=97:
c=ord(i)-ord("a")
d = ord("z")-c
print(chr(d),end="")
elif ord(i)==32:
print(i,end="")
# ord(32) is for white space
# example output: "svool dliow"
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run