Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- letters = ['a', 'b', 'c', 'd', 'e', 'f']
- def testAllCombinationsStartingWith(base, depth):
- for letter in letters:
- newBase = base + letter
- isCorrect = crypt(newBase)
- if (not isCorrect and depth > 1):
- testAllCombinationsStartingWith(newBase, depth - 1)
- def crypt(word):
- print 'testing', word
- return False; # return crypt result here
- def main():
- maxLength = 3
- testAllCombinationsStartingWith('', maxLength)
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement