input: from typing import List
  
  def fibonacci_series_up_to(n: int) -> List[int]:
      """Develop an algorithm in Python to print Fibonacci series up to a given number.
      >>> fibonacci_series_up_to(5)
      [0, 1, 1, 2, 3]
      >>> fibonacci_series_up_to(10)
      [0, 1, 1, 2, 3, 5, 8]
      """
      
      if n < 0:
          return []
      
      series = [0]
      a, b = 0, 1
      while b <= n:
          series.append(b)
          a, b = b, a + b
      
      return series
output:     if n < 0:
          return []
      
      series = [0]
      a, b = 0, 1
      while b <= n:
          series.append(b)
          a, b = b, a + b
      
      return series