input: Write a function to generate the first n Fibonacci numbers and return them as a list. If the input number is 0, return an empty list, and if the input number is 1, return a list containing only the first Fibonacci number.
  def generate_fibonacci(n):
      if n == 0:
          return []
      elif n == 1:
          return [0]
      fib_numbers = [0, 1]
      while len(fib_numbers) < n:
          next_value = fib_numbers[-1] + fib_numbers[-2]
          fib_numbers.append(next_value)
      return fib_numbers[:n]
  
  assert generate_fibonacci(0) == []
  assert generate_fibonacci(1) == [0]
  assert generate_fibonacci(2) == [0, 1]
  assert generate_fibonacci(5) == [0, 1, 1, 2, 3]
  assert generate_fibonacci(10) == [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
output: def generate_fibonacci(n):
      if n == 0:
          return []
      elif n == 1:
          return [0]
      fib_numbers = [0, 1]
      while len(fib_numbers) < n:
          next_value = fib_numbers[-1] + fib_numbers[-2]
          fib_numbers.append(next_value)
      return fib_numbers[:n]