Created
December 27, 2016 12:33
-
-
Save rense/af8fd7c9633fbe1b86311a4567c1e6be to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo = ["foe", "jong", "hai", 'sambal', 'bij'] | |
for x in range(len(foo) + 1): | |
bar = foo[x:] | |
while len(bar): | |
print('.'.join(bar)) | |
_ = bar.pop() | |
foe.jong.hai.sambal.bij | |
foe.jong.hai.sambal | |
foe.jong.hai | |
foe.jong | |
foe | |
jong.hai.sambal.bij | |
jong.hai.sambal | |
jong.hai | |
jong | |
hai.sambal.bij | |
hai.sambal | |
hai | |
sambal.bij | |
sambal | |
bij |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment