Function to check if a numeric string can be split into substrings such that the difference between the consecutive substrings is K
def isPossible ( s , K ) : NEW_LINE INDENT valid = False NEW_LINE firstx = - 1 NEW_LINE DEDENT