input: 
  def is_armstrong_number(num):   
      n = len(str(num)) 
      # initialize sum  
      temp = num  
      sum_of_digits = 0
    
      # find sum of nth power of individual digits  
      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
  
  
  # Test cases
  
  # Example 1:
  # Input: 153
  # Output: True
  # Explanation: 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153
  
  # Example 2:
  # Input: 9474
  # Output: True
  # Explanation: 9^4 + 4^4 + 7^4 + 4^4 = 6561 + 256 + 2401 + 256 = 9474
  
  # Example 3:
  # Input: 121
  # Output: False
  # Explanation: 1^3 + 2^3 + 1^3 = 1 + 8 + 1 = 10 ≠ 121
  
output:     return num == sum_of_digits