Skip to content

Instantly share code, notes, and snippets.

Created May 25, 2013 03:31
Show Gist options
  • Save anonymous/5647788 to your computer and use it in GitHub Desktop.
Save anonymous/5647788 to your computer and use it in GitHub Desktop.
select the nth words from a sentence
' '.join([w for i,w in enumerate(sentence.split(),1) if i in (17,23)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment