title: How can I search for a list within a larger list disregarding the order?
body: <p>Here's a copy of my first atempt at Tic Tac Toe. I have three weeks of experience under my belt. My code works as long as the selections are made in chronological order but if out of sequence, the winner will not be identified.
  Can I have some feedback on how to find a list within a larger list regardless to the order. Also, the program doesn't seem efficient to me. Any suggestions?</p>
  
  <pre><code>var_board = ['1__','2__','3__','4__','5__','6__','7__','8__','9__']
  x_list = []
  o_list = []
  
  def board():
      print(var_board[0] + var_board[1] + var_board[2])
      print(var_board[3] + var_board[4] + var_board[5])
      print(var_board[6] + var_board[7] + var_board[8])
  
  ##Check to see horizontal win
  def horizontal():
      if(set([0,1,2]).issubset(set(x_list))):
          print("***We have a winner***")
      elif (set([3,4,5]).issubset(set(x_list))):
          print("***We have a winner***")
      elif (set([6,7,8]).issubset(set(x_list))):
          print("***We have a winner***")
      else:
          quit
  
  
  ##Check to see vertical win
  def vertical():
      if(set([0,3,6]).issubset(set(x_list))):
          print("***We have a winner***")
      elif (set([1,4,7]).issubset(set(x_list))):
          print("***We have a winner***")
      elif (set([2,5,8]).issubset(set(x_list))):
          print("***We have a winner***")
      else:
          quit
  
  
  ##Check to see diagonal win
  def diagonal():
      if(set([2,4,6]).issubset(set(x_list))):
          print("***We have a winner***")
      elif (set([0,4,8]).issubset(set(x_list))):
          print("***We have a winner***")
      else:
          quit
  
  ##Game play
  board()
  
  while True:
  ## "X" winning positions   
      position = int(input("To make your move, choose a number 1-9: "))-1
      var_board[position] = "X  "
      x_list.append(int(position))
      print("X list: ",x_list)
      board()
      horizontal()
  
  ##"O" winning positions    
      position = int(input("To make your move, choose a number 1-9: "))-1
      var_board[position] = "O  "
      o_list.append(int(position))
      print("O list: ",o_list)
      board()
      horizontal()
  </code></pre>