title: How to check user input for multiple conditions within same loop or function in Python 3?
body: <p>I'm trying to take <code>user-input</code> but I need the input to be an integer, AND be between 1 and 9. I tried putting "in range(1,10)" in a few places in the code but it didn't work. I need the program to keep asking the user for the right input until they give the correct input. So far I've only been able to make sure their input is an integer with he following code. I will be taking input by using <code>int(input("..."))</code>, rather than using <code>input("...")</code>.</p>
  
  <pre><code>while True:
      try:
          ui1 = int(input("Player 1, Your move. Select your move. "))
          break
      except ValueError:
          print("You have to choose a number between 1 and 9")
          continue
  </code></pre>