input: Write a function to check whether a string contains only digits. The function should return True if the string contains only digits, otherwise return False. If the string is empty, the function should return True.
  
  def is_digit_only(string):
      if not string:
          return True
      for char in string:
          if not char.isdigit():
              return False
      return True
  
  print(is_digit_only("0123"))
  print(is_digit_only("abc123"))
  print(is_digit_only(""))
  print(is_digit_only("456"))
  print(is_digit_only("1a2b3c"))
  
  assert is_digit_only("0123")==True
  assert is_digit_only("abc123")==False
  assert is_digit_only("")==True
  assert is_digit_only("456")==True
  assert is_digit_only("1a2b3c")==False
output: def is_digit_only(string):
      if not string:
          return True
      for char in string:
          if not char.isdigit():
              return False
      return True