input: Write a function to generate and print the Fibonacci series up to n numbers where n is provided as input.
  assert fibonacci(10)=="0 1 1 2 3 5 8 13 21 34"
  assert fibonacci(5)=="0 1 1 2 3"
  assert fibonacci(1)=="0"
  assert fibonacci(0)==""
  assert fibonacci(15)=="0 1 1 2 3 5 8 13 21 34 55 89 144 233 377"
output: def fibonacci(n):
      if n == 0:
          return ""
      if n == 1:
          return "0"
      result = ["0", "1"]
      a, b = 0, 1
      for _ in range(2, n):
          a, b = b, a + b
          result.append(str(b))
      return " ".join(result)