1shift = 0
2while 1 > shift or 26 < shift:
3 try:
4 # Swap raw_input for input in Python 3.x
5 shift = int(raw_input("Please enter your shift (1 - 26) : "))
6 except ValueError:
7 # Remember, print is a function in 3.x
8 print "That wasn't an integer :("