input: Write a function to check if a given number is an Armstrong number. If it is, return True, otherwise 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):
      num_str = str(num)
      num_digits = len(num_str)
      sum_of_powers = sum(int(digit) ** num_digits for digit in num_str)
      return sum_of_powers == num