Skip to content

Instantly share code, notes, and snippets.

@pdbartsch
Created March 6, 2019 22:46
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 pdbartsch/f794172ac048aea90a7deedb283adfd8 to your computer and use it in GitHub Desktop.
Save pdbartsch/f794172ac048aea90a7deedb283adfd8 to your computer and use it in GitHub Desktop.
# expression:
abbreviate(!SciName!)
# code block:
def abbreviate(x):
words = x.split()
letters = [word[:2] for word in words]
return "".join(letters)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment