title: append in a list in Python using result value or a function
body: <p>are the both approaches equivalent from a point of view of performance and coding-style?</p>
  
  <pre><code>def foo(n):
      return n*2
  
  # case 1 with ".append(function())"
  
  mylist = [1,2,3,4,5,6,7,8,9,10]
  result = list()
  for l in mylist:
      result.append(foo(l))
  
  # case 2 ".append(result)"
  
  mylist = [1,2,3,4,5,6,7,8,9,10]
  result = list()
  for l in mylist:
      r = foo(l)
      result.append(r)
  </code></pre>