title: Splitting a 2 digit number into 10's and 1's in python
body: <p>I am writing a program where the user must input a number between 0 and 100. Then the program should split the number into 10's and 1's. So if the user inputs 23, the program would return 2 and 3. If the user input 4, the program would return 0 and 4. This is what I have for numbers less than 10, but I'm not sure how to handle 2 digit numbers using the modulo operator. </p>
  
  <pre><code>def split():
      number = int(raw_input("Enter a number between 0 and 100:"))
      if number &lt;10:
          tens = 0
          ones = number
          total = tens + ones
          print "Tens:", tens
          print "Ones:", ones
          print "Sum of", tens, "and", ones, "is", total
  
  split()
  </code></pre>
  
  <p>Thank you!</p>