def armstrongNumber(num):
    """assumes num is an int
    returns a boolean, True if num is an armstrong number, else False.
    An armstrong number = sum of digits ** number of digits
    e.g. 371 = 3**3 + 7**3 + 1**3
    """
    digit_sum = 0
    for digit in str(num):
        digit_sum += int(digit) ** 3
    return num == digit_sum