I'm assuming your number will still be encased in a string, ie. "1" or "4" or "6" - if that's the case, then there are several ways to do it; you could use a regex to check whether it is a number or not, or you could knock up a function that would look something like this
def isNumber(your_input_string):
return len(your_input_string) == 1 and your_input_string in "123456"
Since the number will always be between 1 and 6, it can only be a string of length 1, and it must be contained in the string '123456', since... well, those are the allowed numbers.
EDIT:
As pointed by Martijn Pieters in the comments below, that is a roundabout way of doing it; an easier solution would be just to check whether the string is between '1' or '6'.
def isNumber(your_input_string):
return len(your_input_string) == 1 and '1' <= your_input_string <= '6'
option
is always a string. – Martijn Pieters Nov 15 '13 at 14:34