title: Testing user input against a list in python
body: <p>I need to test if the user input is the same as an element of a list, right now I'm doing this:</p>
  
  <pre><code>cars = ("red", "yellow", "blue")
  guess = str(input())
  
  if guess == cars[1] or guess == cars[2]:
          print("success!")
  </code></pre>
  
  <p>But I'm working with bigger lists and my if statement is growing a lot with all those checks, is there a way to reference multiple indexes something like:</p>
  
  <pre><code>if guess == cars[1] or cars[2]
  </code></pre>
  
  <p>or</p>
  
  <pre><code>if guess == cars[1,2,3]
  </code></pre>
  
  <p>Reading the lists docs I saw that it's impossible to reference more than one index like, I tried above and of course that sends a syntax error.</p>