Python Program to Check Armstrong Number

n=int(input("Enter a number :"))
s=0
q=n
while n>0:
rem=n%10
s+=rem**3
n//=10
if q==s:
print("It is an Armstrong number!")
else:
print("It is not Armstrong number!")

Output:

Python Armstrong Number