input: Write a function in Python to print the Fibonacci series up to the nth number.
  Output:
  def printFibonacciSeries(n): 
  
      # Initialize the first two Fibonacci numbers
      f1, f2 = 0, 1
      
      # Print the first two numbers
      print(f1, f2, end=" ")
      
      for i in range(2, n): 
          next = f1 + f2 
          print(next, end=" ") 
    
          # Update the values for the next iteration
          f1 = f2 
          f2 = next
  
  # Test cases
  assert printFibonacciSeries(5) == print(0, 1, 1, 2, 3)
  assert printFibonacciSeries(0) == print("")
  assert printFibonacciSeries(1) == print(0)
  assert printFibonacciSeries(2) == print(0, 1)
  assert printFibonacciSeries(10) == print(0, 1, 1, 2, 3, 5, 8, 13, 21, 34)
output: def printFibonacciSeries(n): 
      if n <= 0:
          return
      f1, f2 = 0, 1
      print(f1, end=" ")
      if n > 1:
          print(f2, end=" ")
      for i in range(2, n): 
          next = f1 + f2 
          print(next, end=" ") 
          f1 = f2 
          f2 = next