Skip to content

Instantly share code, notes, and snippets.

@christianp
Created March 1, 2015 12:25
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 christianp/4d55e5c78aae5d4b41d4 to your computer and use it in GitHub Desktop.
Save christianp/4d55e5c78aae5d4b41d4 to your computer and use it in GitHub Desktop.
number of words between "landslide" and "Beelzebub" in Bohemian Rhapsody - https://twitter.com/wacnt/status/558051793121607681
# bohemian rhapsody lyrics from http://www.azlyrics.com/lyrics/queen/bohemianrhapsody.html
bohemian_rhapsody = re.sub(r'[?!.,]','',bohemian_rhapsody)
words = re.split(r'\s+',bohemian_rhapsody)
print(words.index("Beelzebub")-words.index("landslide"))
@christianp
Copy link
Author

279

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment