input: def fibonacci(n: int) -> List[int]:
      """Generate the Fibonacci series up to a given number and return as a list.
      >>> fibonacci(5)
      [0, 1, 1, 2, 3]
      >>> fibonacci(8)
      [0, 1, 1, 2, 3, 5, 8, 13]
      """
      if n <= 0:
          return []
      result = []
      a, b = 0, 1
      while len(result) < n:
          result.append(a)
          a, b = b, a + b
      return result
output:     if n <= 0:
          return []
      result = []
      a, b = 0, 1
      while len(result) < n:
          result.append(a)
          a, b = b, a + b
      return result