title: Compare string and integer in same if statement
body: <p>I have a program that takes input from the user. I want to display an invalid option message if the input is a string or it is not a number between 1 to 4. I want to check all these 3 conditions in a single if statement.</p>
  <pre><code>ask_option = input(&quot;Your option: &quot;)
  
  if int(ask_option) != int and (int(ask_option) &lt; 1 or int(ask_option) &gt; 4):
      print(&quot;Not a valid option&quot;)
  </code></pre>
  <p>I feel the int(ask_option) != int is incorrect. But is it possible to fulfill all these 3 in a single if statement?</p>
  <p>My code fulfills the criteria to choose between 1-4 but doesn't work to check string input. Please help</p>