input: Write a function to check whether a string contains only digits. If the string contains only digits, return True; otherwise, return False. If the input string is empty, return True.
  def is_digit_only(string):
      for char in string:
          if not char.isdigit():
              return False
      return True
output: def is_digit_only(string):
      for char in string:
          if not char.isdigit():
              return False
      return True