input: Write a function to print out all the odd numbers from 1 to 10 using a loop in Python.
  for i in range(1, 11):
      if i % 2 != 0:
          print(i)
  assert odd_numbers()=="1\n3\n5\n7\n9\n"
  assert odd_numbers()=="1\n3\n5\n7\n9\n"
  assert odd_numbers()=="1\n3\n5\n7\n9\n"
  assert odd_numbers()=="1\n3\n5\n7\n9\n"
  assert odd_numbers()=="1\n3\n5\n7\n9\n"
output: def odd_numbers():
      result = ""
      for i in range(1, 11):
          if i % 2 != 0:
              result += str(i) + "\n"
      return result