Really need some help here. Super early in learning Python.
The goal is to take a number and see if the digits are in ascending order. What I have so far is:
a = int(input("Enter a 4-digit number: "))
b = [int(i) for i in str(a)]
if b[0] > b[1]:
print "Not ascending"
elif b[1] > b[2]:
print "Not ascending"
elif b[2] > b[3]:
print "Not ascending"
else:
print "Ascending!"
My question is, how can I make it so that there's no limit on the amount of digits entered? So if someone enters a 7 digit number it does the same process up to the last digit.