From c65028dd5d5d7e188898b550a0e4b147be126abb Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 30 Aug 2018 20:18:53 +0200 Subject: Initial --- passwords.py | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 passwords.py (limited to 'passwords.py') 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) -- cgit v1.2.3-54-g00ecf