I'm now studying recursion and try to build some codes to generate all binary strings of the given length 'n'. I found a code to use for loop:
n = 5
for i in range(2**n, 2**(n+1)):
print(bin(i)[3:])
But is there any other way to solve this problem using recursion? Thank you!