input: 
  from typing import List
  
  def fibonacci(n: int) -> List[int]:
      """Prints the Fibonacci series up to a given number n.
      
      >>> fibonacci(0)
      []
      >>> fibonacci(1)
      [0]
      >>> fibonacci(2)
      [0, 1]
      >>> fibonacci(10)
      [0, 1, 1, 2, 3, 5, 8]
      """
      if n < 0:
          return []
      
      series = []
      a, b = 0, 1
      
      while a < n:
          series.append(a)
          a, b = b, a + b
      
      return series
  
output:     if n == 0:
          return []
      elif n == 1:
          return [0]
      else:
          series = [0, 1]
          while series[-1] < n:
              series.append(series[-1] + series[-2])
          if series[-1] >= n:
              series.pop()
          return series