title: Python 3.30 TypeError: object of type 'int' has no len()
body: <p>Here's the error I get <code>for i in range(len(n))</code>:
  </p>
  
  <pre class="lang-py prettyprint-override"><code>TypeError: object of type 'int' has no len()
  </code></pre>
  
  <p>I have seen other posts on here but haven't found the solution yet.<br>
  I'm confused. Please comment if you know what's going on here.</p>
  
  <p>Here's my code:</p>
  
  <pre class="lang-py prettyprint-override"><code>#ch6.ex11.py
  
  def squareEach(x):
      sqrt = x*x
      return sqrt
  
  
  def main():
      n = []
      n = eval(input("Enter a list of numbers to be squared seperated by comma:\n"))
      i = 1
      sqrtn = ()
  
      for i in range(len(n)):
          sqrtn = squareEach(n)
          ++i
  
      print("Here's your results: ",sqrtn)
  
  main()
  </code></pre>