Python 3 program to print the number which contain the digit d from 0 to n
def index ( st , ch ) : NEW_LINE INDENT for i in range ( len ( st ) ) : NEW_LINE INDENT if ( st [ i ] == ch ) : NEW_LINE INDENT return i ; NEW_LINE DEDENT DEDENT return - 1 NEW_LINE DEDENT