input: Write a python function to create a diamond shape with asterisks, where n is the number of rows and n must be an odd number.
  assert diamond(5) == "  *  \n *** \n*****\n *** \n  *  \n"
  assert diamond(7) == "   *   \n  ***  \n ***** \n*******\n ***** \n  ***  \n   *   \n"
  assert diamond(3) == " * \n***\n * \n"
output: def diamond(n):
      if n % 2 == 0 or n < 1:
          return ""
      
      result = []
      for i in range(n):
          spaces = abs((n // 2) - i)
          stars = n - 2 * spaces
          result.append(" " * spaces + "*" * stars + " " * spaces)
      
      return "\n".join(result) + "\n"