input: Write a python function to print Fibonacci series up to the nth number.
  assert capture_output(printFibo(10)) == "0 1 1 2 3 4 8 13 21 34 "
  assert capture_output(printFibo(5)) == "0 1 1 2 3 "
  assert capture_output(printFibo(0)) == "0"
output: def printFibo(n):
      a, b = 0, 1
      result = []
      for _ in range(n):
          result.append(a)
          a, b = b, a + b
      print(" ".join(map(str, result)))