Skip to content

Instantly share code, notes, and snippets.

@stesh
Created May 22, 2013 21:03
Show Gist options
  • Select an option

  • Save stesh/5630887 to your computer and use it in GitHub Desktop.

Select an option

Save stesh/5630887 to your computer and use it in GitHub Desktop.
>>> english = set(open('/usr/share/dict/words').read().splitlines())
>>> left_hand = 'qwertasdfgzxcvb'
>>> words_typeable_by_left_hand = [w for w in english if all(c in left_hand for c in w)]
>>> print max(words_typeable_by_left_hand,key = lambda w: len(w))
reverberates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment