title: 'int' is not iterable with if statement
body: <p>I am working on a tic-tac-toe game and I am creating the if statements for the locations on the grid (i.e. (a,1) (b,2) (c,3) ect.) </p>
  
  <p>I keep getting "'int' object is not iterable" once the code reaches my first if statement.</p>
  
  <p>Current code:</p>
  
  <pre><code>def getXandY():
      y=input("Enter your move [letter, number]: ")
      acc=[]
      for i in y:
          acc.append(i)
  
      y=int(acc[1])
      x=acc[0]
      print(x,y)
  
  
      if y == 1:
          return 0
      print(x,y)
      if y == 2:
          return 1
      print(x,y)
      if y == 3:
          return 2
     else:
          return -1
      x=x.lower()
  
  
      num=convrtLet2Num(x)
  
      return num,y
  
  def convrtLet2Num(x):
      if x == 'a':
          return 0
      if x== 'b':
          return 1
      if x== 'c':
      return 2
      else:
          return -1
  </code></pre>
  
  <p>I reaches the point where the first "print(x,y)" is and then the error happens at the if statement. Any ideas whats causing the error?</p>
  
  <p>In the case I was testing y=1 and x='a'</p>