Skip to content

Instantly share code, notes, and snippets.

@awentzonline
Created August 22, 2013 17:45
Show Gist options
  • Select an option

  • Save awentzonline/6310460 to your computer and use it in GitHub Desktop.

Select an option

Save awentzonline/6310460 to your computer and use it in GitHub Desktop.
def nn(name):
if len(name) < 3:
return name
return '%s%d%s' % (
name[0], len(name) - 2, name[-1]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment