# Title: Armstrong number check
# Heading: Python Program to Check an Armstrong Number
# Level: beginner
# Tags: armstrong number, narcissistic number, digits, loops
# About: Checks whether a number equals the sum of its digits, each raised to the power of how many digits it has.

def is_armstrong(number):
    """True if number is an Armstrong number."""
    digits = str(number)
    power = len(digits)
    total = 0
    for digit in digits:
        total += int(digit) ** power
    return total == number


print("153:", is_armstrong(153))
print("123:", is_armstrong(123))
