input: def fibonacci(n): 
      """Generate the Fibonacci series up to the given number n.
      >>> fibonacci(5)
      [0, 1, 1, 2, 3]
      >>> fibonacci(0)
      []
      >>> fibonacci(1)
      [0]
      >>> fibonacci(10)
      [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
      """
      if n < 0: 
          return []
      elif n == 0: 
          return [0]
      elif n == 1: 
          return [0, 1]
      else:
          series = [0, 1]
          a, b = 0, 1
          for i in range(2, n): 
              c = a + b 
              series.append(c)
              a, b = b, c 
          return series
output:     if n < 0: 
          return []
      elif n == 0: 
          return [0]
      elif n == 1: 
          return [0, 1]
      else:
          series = [0, 1]
          a, b = 0, 1
          for i in range(2, n): 
              c = a + b 
              series.append(c)
              a, b = b, c 
          return series