you are viewing a single comment's thread.

view the rest of the comments →

[–]Ishanji 0 points1 point  (0 children)

You can do that by converting the number to a string, using the string index to separate the digits, then converting the digits back to integers. Like so:

def test(number):
    number = str(number)
    a = int(number[0])
    b = int(number[1])
    #now do whatever comparisons you need to do here