title: Python 3: While loop not returning False
body: <p>I'm making a 3 in a row game for practice using the concepts I have learned in class so far: while loops, booleans, and if-statements.</p>
  
  <p>For some reason, my function doesn't seem to be returning False even though I give an argument in which it should. Instead I get a 'executing command, please wait for result' message, where nothing comes up after that. Initially I thought it was caught in an infinite loop somewhere, but I don't think it should as I gave limits to all my variables and added the +=1 at the end for all of the while loops.</p>
  
  <p>Any help will be much appreciated!</p>
  
  <p>Here is a snippet of my code below:</p>
  
  <pre><code>def is_winner(grid):
      x = 0
      y = 0
  
  
      while x &lt;=3:
          x +=1
          while y &lt;= 4:  
  
              if grid[x][y] == grid[x + 1][y] ==grid[x + 2][y]:
                  y += 1
  
                  return True
      while x &lt;= 3: 
          x +=1
          while y &lt;= 3:
              if grid[x][y] == grid[x + 1][y - 1] == grid[x + 2][y - 2]:
                  y +=1
  
                  return True
  
      else:
          return False
  </code></pre>