title: How to append float to list?
body: <p>I want to append float to list, but I got an error like this:</p>
  
  <pre><code>&lt;ipython-input-47-08d9c3f8f180&gt; in maxEs()
       12    Es = lists[0]*0.3862 + lists[1]*0.3091 + lists[2]*0.4884
       13    aaa = []
  ---&gt; 14    Es.append(aaa)
       15 
  
   AttributeError: 'float' object has no attribute 'append'
  </code></pre>
  
  <p>I guess I can't append float to list. Can I add floats to list another way?</p>
  
  <p>This is my code:</p>
  
  <pre><code>import math
  
  def maxEs():
      for a in range(1, 101):
          for b in range(1,101):
              for c in range(1,101):
                  if a+b+c == 100 :
                    lists = []
                    lists.append(a*0.01)
                    lists.append(b*0.01)
                    lists.append(c*0.01)
                    Es = lists[0]*0.3862 + lists[1]*0.3091 + lists[2]*0.4884
                    aaa = []
                    Es.append(aaa)
  </code></pre>