how do you want to use them in the if statement? one by one? make another number with them ?
to get the first three digits of a number l_numb in another number fist_d, you can use :
first_d = int(str(l_numb)[:3])
you might then use that number in your if statement.
if you want them one by one, just iterate through str(l_numb)[:3]