title: Using any() and all() to check if a list contains one set of values or another
body: <p>My code is for a Tic Tac Toe game and checking for a draw state but I think this question could be more useful in a general sense.</p>
  
  <p>I have a list that represents the board, it looks like this:</p>
  
  <pre><code>board = [1,2,3,4,5,6,7,8,9]
  </code></pre>
  
  <p>When a player makes a move the int they moved on is replaced with their marker ('x' or 'o'), I already have checks in place to look for a winning state, what I can't do is check for a draw state, where none of the list values are ints but a winning state has not been set.</p>
  
  <p>The code I have so far:</p>
  
  <pre><code>if any(board) != playerOne or any(board) != playerTwo:
      print 'continue'
  elif all(board) == playerOne or playerTwo:
      print 'Draw'
  </code></pre>
  
  <p>The if statement works, the elif does not, I think the problem is my 'or' operator, what I want to check for is: if the every item on the board is either playerOne marker or playerTwo marker, if I where to make the code:</p>
  
  <pre><code>elif all(board) == playerOne or all(board) == playerTwo:
  </code></pre>
  
  <p>I would be checking to see if every place on the board was playerOne or every place on the board is playerTwo, which it won't be.</p>
  
  <p>So how do I check if the board is taken up by a combination of playerOne markers and playerTwo markers?</p>