I would like to know the easiest way to check it the user typing in a letter versus a number. If the user types in a letter it would give them an error message and give them the question back. Right now I have it so when the user enters a 'q' it will exit the script.
if station == "q":
break
else:
#cursor.execute(u'''INSERT INTO `scan` VALUES(prefix, code_id, answer, %s, timestamp, comport)''',station)
print 'Thank you for checking into station: ', station
I need it to loop back to the question asking for the station.