input: Write a python function to generate a list of Fibonacci numbers up to the nth element.
  assert fibonacci(5) == [0, 1, 1, 2, 3, 5]
  assert fibonacci(8) == [0, 1, 1, 2, 3, 5, 8, 13, 21]
  assert fibonacci(10) == [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
output: def fibonacci(n):
      if n < 0:
          return []
      fib_sequence = [0, 1]
      while len(fib_sequence) <= n:
          fib_sequence.append(fib_sequence[-1] + fib_sequence[-2])
      return fib_sequence[:n+1]