input: Write a function to check if a given number is an Armstrong number. Return True if it is an Armstrong number, otherwise return False. An Armstrong number is a number that is equal to the sum of its own digits each raised to the power of the number of digits in the number. For example, 153 is an Armstrong number because 1^3 + 5^3 + 3^3 = 153.
  
  def is_armstrong_number(num):
      n = len(str(num))
      # initialize sum
      sum_of_digits = 0
    
      # find sum of nth power of individual digits
      temp = num
      while temp > 0:
          digit = temp % 10
          sum_of_digits += digit ** n
          temp //= 10
    
      # if num is equal to sum_of_digits then the number is an Armstrong number
      if num == sum_of_digits:
          return True
    
      else:
          return False
  
  assert is_armstrong_number(153) == True
  assert is_armstrong_number(9474) == True
  assert is_armstrong_number(123) == False
  assert is_armstrong_number(0) == True
  assert is_armstrong_number(1) == True
output: def is_armstrong_number(num):
      n = len(str(num))
      sum_of_digits = 0
      temp = num
      while temp > 0:
          digit = temp % 10
          sum_of_digits += digit ** n
          temp //= 10
      if num == sum_of_digits:
          return True
      else:
          return False