Skip to content

Instantly share code, notes, and snippets.

@daGrevis
Created December 31, 2011 20:06
Show Gist options
  • Save daGrevis/1545195 to your computer and use it in GitHub Desktop.
Save daGrevis/1545195 to your computer and use it in GitHub Desktop.
Makes full name more anonymous (`John Smith` -> `John S.`)
full_name = raw_input('What\'s your full name? ')
parts_of_name = full_name.split()
first_name = parts_of_name[0]
last_name = parts_of_name[1]
initial_letter_of_last_name = last_name[0]
print '{0} {1}.'.format(first_name, initial_letter_of_last_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment