Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (15 sloc) 329 Bytes
# coding: utf-8
def direct(n):
return _direct(1, n)
def _direct(i, n):
if i > n:
return ['']
else:
s = []
result = _direct(i, n - 1)
s.extend(result)
for item in result:
s.append(item + str(n))
return s
if __name__ == "__main__":
print(direct(3))
You can’t perform that action at this time.