diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2018-08-30 20:18:53 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2018-08-30 20:18:53 +0200 |
commit | c65028dd5d5d7e188898b550a0e4b147be126abb (patch) | |
tree | 674e2d1e3b7cdb279fa8463ced58ce8be98d7867 /passwords.py |
Initial
Diffstat (limited to 'passwords.py')
-rwxr-xr-x | passwords.py | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/passwords.py b/passwords.py new file mode 100755 index 0000000..74f2ee4 --- /dev/null +++ b/passwords.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python3 +import sys + +words = [ + "about", + "after", + "again", + "below", + "could", + "every", + "first", + "found", + "great", + "house", + "large", + "learn", + "never", + "other", + "place", + "plant", + "point", + "right", + "small", + "sound", + "spell", + "still", + "study", + "their", + "there", + "these", + "thing", + "think", + "three", + "water", + "where", + "which", + "world", + "would", + "write", +] + +index = 0 +poss = words + +for arg in sys.argv[1:]: + idcs = [] + if len(arg) == 0 or arg == "-": + index += 1 + continue + + for i in range(len(poss)): + if poss[i][index] in arg: + idcs.append(i) + + poss = [poss[i] for i in idcs] + index += 1 + +print(poss) |