I tried writing a code for a recursive function that takes x value as an input parameter and print an x-digit strictly increasing number. For example x = 6 gives output 67891011.
l = []
def recfun(x):
    if x == 12:
        for i in range(0,len(l)):
            l[i] = str(l[i])
        print(l)
        return int("".join(l))
    else:
        l.append(x)
        x += 1
        recfun(x)
x = int(input('Enter a number: '))
y = recfun(x)
print(y)
I know this won't work for other values except 6. But the returned value printed displays None.
Input:
Enter a number: 6
Output:
['6', '7', '8', '9', '10', '11']
None
Kindly suggest some way to overcome this.
 
     
     
     
    