title: Python:Getting argument of type int not iterable error
body: <p>why am I getting a "argument of type int not iterable error"? Here is my simple code. </p>
  
  <pre><code>def remove_duplicates(x):
      out = x[0]
      for i in range(1,len(x)):
          if x[i] in out:
              print "duplicate " + str(x[i])
          else:
              out.append(x[i])    
      return out
  
  remove_duplicates([4,5,5,4])
  </code></pre>
  
  <p>Got the following output.</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "&lt;stdin&gt;", line 4, in remove_duplicates
  TypeError: argument of type 'int' is not iterable
  </code></pre>