title: TypeError argument of type 'int' is not iterable and 'int' object has no attribute '_getitem_'
body: <p>i got a problem in this part</p>
  
  <p>it seems like many people do get this error</p>
  
  <p>but i cant find one i understand and solve my quetion</p>
  
  <p>i post the whole code on it so i hope people who want to help can spotted even the hidden issues</p>
  
  <pre><code>import random
  import sys
  
  global err
  global games
  global avr
  global letter,mults1,mults2,quo1,quo2,ans
  def generate():
  mults=[random.randint(100,999),random.randint(10,99)]
  return mults
  def cypher():
  let=["A","B","C","D","E","F","G","H","I","J"];
  random.shuffle(let)
  return let
  def display():
  print letter
  print "     ",check(mults1[0]),check(mults1[1]),check(mults1[2])
  print "*      ",check(mults2[0]),check(mults2[1])
  print "------------"
  print "   ",check(quo1[0]),check(quo1[1]),check(quo1[2]),check(quo1[3])
  print " ",check(quo2[0]),check(quo2[1]),check(quo2[2]),check(quo2[3])
  print "------------"
  print "=",check(ans[0]),check(ans[1]),check(ans[2]),check(ans[3]),check(ans[4])
  #   if winthegame : return 1
  #   else : return 0
  def check(i):
  if i in letter: return letter[i]
  else : return i
  def play():
  inplet=raw_input('Enter the LETTER (A-J): ')
  number=raw_input('Enter the matched NUMBER (0-9): ')
  number=int(number)
  print number
  if number in letter : #TypeError argument of type 'int' is not iterable
      if inplet == letter[number] : #without the line above Shows another error #'int' object has no attribute '_getitem_' here
          print "Answer matched !"
          del letter[number]
          return true
  return false
  
  #main part
  while 1:
  mul=generate()
  print mul
  mults1=[mul[0]/100,(mul[0]/10)%10,mul[0]%10]
  mults2=[mul[1]/10,mul[1]%10]
  tmp1=mul[0]*mults2[1]
  quo1=[tmp1/1000,(tmp1/100)%10,(tmp1/10)%10,tmp1%10]
  tmp2=mul[0]*mults2[0]
  quo2=[tmp2/1000,(tmp2/100)%10,(tmp2/10)%10,tmp2%10]
  tmp3=mul[0]*mul[1]
  ans=[tmp3/10000,(tmp3/1000)%10,(tmp3/100)%10,(tmp3/10)%10,tmp3%10]
  let=cypher()
  letter={0:let[0],1:let[1],2:let[2],3:let[3],4:let[4],5:let[5],6:let[6],7:let[7],8:let[8],9:let[9]}
  #clean the dictionary
  checker=[0,0,0,0,0,0,0,0,0,0]
  i=0
  while i&lt;3:checker[mults1[i]]=1;i+=1
  i=0
  while i&lt;2:checker[mults2[i]]=1;i+=1
  i=0
  while i&lt;4:checker[quo1[i]]=1;i+=1
  i=0
  while i&lt;4:checker[quo2[i]]=1;i+=1
  i=0
  while i&lt;5:checker[ans[i]]=1;i+=1
  i=0 
  while i&lt;10:
      if checker[i]==0 : del letter[i]    
      i+=1
  display()
  letter=input();
  #game start
  while 1:
      play()
  </code></pre>
  
  <p>thanks a lot for help</p>