Generally you write a function for that, something like this:
# check the input of an integer between given limits
def check_input(low, high):
check the input to be an integer number within a given range
prompt = "Enter an integer number between %d and %d: " % (low, high)
a = int(raw_input(prompt))
if low <= a <= high:
print("Hey, I said integer number!")
# test the function ...
# expecting an integer number between 1 and 50
num_test = check_input(1, 50)
The function loops until the correct input has been received.