input: Write a python function to generate a Fibonacci sequence of given length.
  assert fibonacci(1) == [0]
  assert fibonacci(2) == [0, 1]
  assert fibonacci(5) == [0, 1, 1, 2, 3]
  assert fibonacci(7) == [0, 1, 1, 2, 3, 5, 8]
output: def fibonacci(n):
      if n == 1:
          return [0]
      elif n == 2:
          return [0, 1]
      fib_seq = [0, 1]
      for i in range(2, n):
          fib_seq.append(fib_seq[-1] + fib_seq[-2])
      return fib_seq