title: Python: Fibonacci Sequence
body: <p>I'm just trying to improve my programming skill by making some basic functions.</p>
  
  <p>I want to fill a list with fibonacci values, but I think my code gives the sum of all the numbers put together and prints that instead..</p>
  
  <pre><code>numberlist = []
  i = 0
  for i in range(20):
      numberlist.append(i)
  
  print numberlist
  
  fibonaccinumbers = []
  
  for n in numberlist:
      def fib(n):
          a, b = 0, 1
          for i in range(n):
              a, b = b, a + b
          return a
      a = fib(n)
      fibonaccinumbers.append(a)
  
  
  print a
  </code></pre>
  
  <p>Where have I gone wrong?</p>