converting the sub - string starting from index ' i ' and having length ' len ' to int and checking if it is greater than X or not
num = int ( S [ i : i + j ] ) NEW_LINE if ( num > X ) : NEW_LINE INDENT cnt = cnt + 1 NEW_LINE DEDENT j = j + 1 NEW_LINE return cnt ; NEW_LINE