Created
March 4, 2014 03:46
-
-
Save wallstop/9339939 to your computer and use it in GitHub Desktop.
This file contains 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
alphabet = "abcdefghijklmnopqrstuvwxzy" | |
masterSet = list() | |
def generateSet(): | |
global masterSet | |
masterSet.clear() | |
basis = list(alphabet) | |
masterSet = list(alphabet) | |
for i in range(0, 26): | |
newList = list() | |
for element in basis: | |
for character in alphabet: | |
if(ord(character[0]) > ord(element[-1])): | |
masterSet.append(element + character[0]) | |
newList.append(element + character[0]) | |
basis = newList |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment