input: Write a function to generate and return a list of Fibonacci numbers up to n elements.
  assert generate_fibonacci(5) == [0, 1, 1, 2, 3]
  assert generate_fibonacci(1) == [0]
  assert generate_fibonacci(7) == [0, 1, 1, 2, 3, 5, 8]
output: def generate_fibonacci(n):
      if n <= 0:
          return []
      elif n == 1:
          return [0]
      
      fib_sequence = [0, 1]
      while len(fib_sequence) < n:
          fib_sequence.append(fib_sequence[-1] + fib_sequence[-2])
      
      return fib_sequence