alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!?."
list = []
msg = 'Hello World'
key = input()
key = int(key)
print(alphabet[key])
for x in msg:
list.append(x)
print(list)
So basically i need to replace each letter of my array to a specify position (given by the key) of my string. e.g. key = 3 so H becomes L , E becomes I , L becomes P etc... it's basically a Caesar cipher