How to determine when input is alphabetic? <p>I been trying to solve this one for a while and can't seem to make it work right.. here is my current work </p> <pre><code>while True: guess = int(raw_input('What is your number?')) if 100 &lt; guess or guess &lt; 1: print '\ninvalid' else: .....continue on </code></pre> <p>Right now I have made it so when a user input a number higher than 100 or lower than 1, it prints out "invalid". BUT what if i want to make it so when a user input a string that is not a number(alphabetic, punctuation, etc.) it also returns this "invalid" message?</p> <p>I have thought about using if not ...isdigit(), but it won't work since I get the guess as an integer in order for the above range to work. Try/except is another option I thought about, but still haven't figured out how to implement it in correctly.</p>