title: My program is not returning true when I need it to in Python
body: <p>I am creating a game and I have functions that takes parameters and returns a value. I want to check if the game has ended. The game endes when <code>bins = [0, 0, 0, 0, 0]</code>. I have tried everything and cannot get gameIsOver to be true in the main function. What am I doing wrong?</p>
  
  <pre><code>bins = [7, 7, 7, 7, 7]
  
  gameIsOver = False
  
  def checkGameEnd(listOfBins):
      if listOfBins[0] == 0 and listOfBins[1] == 0 and listOfBins[2] == 0 and listOfBins[3] == 0 and listOfBins[4] == 0:
          gameDidEnd = True
          return True
      else:
          gameDidEnd = False
          return False
  
  def _main_():
      print(displayGame(bins))
      checkGameEnd(bins)
      player_1 = "Player 1"
      player_2 = "Player 2"
  
      while didEndGame == False:
          turnPlayer1_bin = int(input(player_1 + ", which bin do you want to remove matches from?\t"))
          turnPlayer1_matches = int(input(player_1 + ", how many matches will you remove from bin " + str(turnPlayer1_bin) + "?\t"))
          removeMatches(turnPlayer1_bin, turnPlayer1_matches, bins)
          print(displayGame(bins))
          checkGameEnd(bins)
          if didEndGame == True:
              print(player_2 + ", you win!")
  
  
          turnPlayer2_bin = int(input(player_2 + ", which bin do you want to remove matches from?\t"))
          turnPlayer2_matches = int(input(player_2 + ", how many matches will you remove from bin " + str(turnPlayer2_bin) + "?\t"))
          removeMatches(turnPlayer2_bin, turnPlayer2_matches, bins)
          print(displayGame(bins))
          checkGameEnd(bins)
          if didEndGame == True:
              print(player_1 + ", you win!")
  
  _main_()
  </code></pre>