title: Trying to learn how to calculate variance by myself, however don't understand this error
body: <pre><code>investment2 = [12, -2, 10, 0, 7, 3]
  investment2_mean = sum(investment2)/len(investment2)
  
  print(investment2_mean)
  
  for x in investment2:
      squaring_step = (x-investment2_mean)**2
      variance = sum(squaring_step)
      print(variance)
  </code></pre>
  
  <p><strong><em>variance = sum(squaring_step)
  TypeError: 'float' object is not iterable</em></strong></p>