# -*- coding: utf-8 -*- """ Created on Thu May 31 18:23:16 2018 @author: stkarlos """ def discrete_maths(start , stop , show = False): k = [] for i in range(start , stop + 1): j = str(i) if (int(j[0]) < int(j[1])) and int(j[0]) != 0 : k.append(i) if show != False: print k return len(k) a = 100 b = 999 print discrete_maths(a,b)