Skip to content

Instantly share code, notes, and snippets.

@Grantismo
Last active August 30, 2022 19:06
Show Gist options
  • Save Grantismo/ab123a2ca6007e5bc32eb9d421f8efff to your computer and use it in GitHub Desktop.
Save Grantismo/ab123a2ca6007e5bc32eb9d421f8efff to your computer and use it in GitHub Desktop.
words = [w.strip() for w in open('/usr/share/dict/words').readlines()]
print([w for w in words if len(w) == 8 and w[0] == w[6]
and w[1] == w[3] and w[1] == w[5] and w[2] == w[7]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment