input: def fibonacci(n: int) -> List[int]:
      """ Prints the Fibonacci series up to a given number n. Returns a list of Fibonacci numbers up to n.
      >>> fibonacci(10)
      [0, 1, 1, 2, 3, 5, 8]
      >>> fibonacci(1)
      [0, 1]
      """
      if n < 0:
          return []
      fib_series = [0, 1]
      while fib_series[-1] + fib_series[-2] <= n:
          fib_series.append(fib_series[-1] + fib_series[-2])
      return fib_series
  
  n = int(input("Enter a number: "))
  print(fibonacci(n))
output:     if n < 0:
          return []
      fib_series = [0, 1]
      while fib_series[-1] + fib_series[-2] <= n:
          fib_series.append(fib_series[-1] + fib_series[-2])
      return fib_series