Skip to content

Instantly share code, notes, and snippets.

@mdwhatcott mdwhatcott/
Last active Jan 2, 2016

What would you like to do?
Here's some Python code to convert a passage of text into first-letter sequences to facilitate memorization:
def first_letter_mnemonic(text):
words = text.split()
letters = []
for word in words:
if word[-1] in ',-': # inline punctuation
elif word[-1] in '.;:?!': # delimiting punctuation
letters.append(word[-1] + ' ')
return (''.join(letters)).strip()
print first_letter_mnemonic('<paste_verse_here>')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.