Skip to content

Instantly share code, notes, and snippets.

@JimMackin
Created July 2, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JimMackin/ed2f5da1d7b7a72ad786 to your computer and use it in GitHub Desktop.
Save JimMackin/ed2f5da1d7b7a72ad786 to your computer and use it in GitHub Desktop.
Small script to play the reg plate game
import sys
if len(sys.argv) < 2:
print "Please provide a reg plate"
exit()
reg_plate = sys.argv[1].lower()
words = open('/usr/share/dict/words','r')
print "Words for: "+reg_plate
for word in words:
word = word.strip()
if word[0] == reg_plate[-3] and word[-1] == reg_plate[-1] and reg_plate[-2] in word[1:-1]:
print word
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment