Use split()
numbers = input("Please type a code: ").split()
# ['16', '25', '20', '8', '14', '0', '9', ',19', '0', '3', '15', '15', '12']
Use for .. in ..
for num in numbers:
print( x[int(num)] )
If you use 0
as space
you have to add space
at the begginig of list
x = [' ', 'a', 'b', 'c', .... ]
now x[0] == ' '
solved Caesar cypher in Python