title: TypeError: 'int' object is not iterable
body: <p>There is an error when I execute This code-<br>
  <strong>for i in len(str_list):
  TypeError: 'int' object is not iterable</strong></p>
  
  <p>How would I fix it? (Python 3)</p>
  
  <pre><code>def str_avg(str):
      str_list=str.split()
      str_sum=0
      for i in len(str_list):
          str_sum += len(str_list[i])
      return str_sum/i
  </code></pre>