input: Write a function that checks if a given number is an Armstrong number. 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. If the number is an Armstrong number, return True, otherwise return False.
  
  assert is_armstrong_number(153) == True
  assert is_armstrong_number(123) == False
  assert is_armstrong_number(9474) == True
  assert is_armstrong_number(120) == False
  assert is_armstrong_number(371) == True
output: def is_armstrong_number(num):
      digits = str(num)
      power = len(digits)
      sum_of_powers = sum(int(digit) ** power for digit in digits)
      return sum_of_powers == num