title: Comparing digits in an integer in Python
body: <p>Really need some help here. Super early in learning Python.</p>
  
  <p>The goal is to take a number and see if the digits are in ascending order.
  What I have so far is:</p>
  
  <pre><code>a = int(input("Enter a 4-digit number: "))
  
  b = [int(i) for i in str(a)]
  
  if b[0] &gt; b[1]:
      print "Not ascending"
  elif b[1] &gt; b[2]:
      print "Not ascending"
  elif b[2] &gt; b[3]:
      print "Not ascending"
  else:
      print "Ascending!"
  </code></pre>
  
  <p>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.</p>