For this Question: Given two integers N and D, your task is to find the numbers between 1 to N which contains the digit D at least 1 time.Input contains only two integers N and D.

Constraints:-
1 < = N < = 100000
1 < = D < = 9Print all the numbers from 1 to N which contains the digit D in it separated by space in non decreasing order.Sample Input:-
20 5

Sample Output:-
5 15

Sample Input:-
15 1

Sample Output:-
1 10 11 12 13 14 15, I have written this Solution Code: def index(st, ch):
    for i in range(len(st)):
        if (st[i] == ch):
            return i;
    return -1


def printNumbers(n, d):
    # Converting d to character
    st = "" + str(d)
    ch = st[0]
    l = []

    # Loop to check each digit one by one.
    for i in range(0, n + 1, 1):

        # initialize the string
        st = ""
        st = st + str(i)

        # checking for digit
        if (i == d or index(st, ch) >= 0):
            # print(i, end = " ")
            l.append(i)
    for k in range(0, len(l) - 1):
        print(l[k], end=" ")


    print(l[len(l) - 1])

# Driver code
if __name__ == '__main__':
    li = list(map(int, input().strip().split()))
    n = li[0]
    d = li[1]
    printNumbers(n, d), In this Programming Language: Python, Now tell me if this Code is compilable or not?