A number is said to be an armstrong number if it's sum of digit with power of length of number is equal to the actual number.
example -
153 is an armstrong number because 1**3+5**3+3**3=153
program -
print("Enter any number")
n=int(input())
l=len(str(n))
a=n
ans=0
while(a>0):
t=a%10
ans=ans+t**l
a=int(a/10)
if ans==n:
print("It is armstrong number")
else:
print("It is not armstrong number")
Enter any number
153
It is armstrong number
Enter any number
7
It is armstrong number
Enter any number
241
It is not armstrong number