Skip to content

Instantly share code, notes, and snippets.

@jimmyhillis
Created June 19, 2013 09:04
Show Gist options
  • Save jimmyhillis/5812837 to your computer and use it in GitHub Desktop.
Save jimmyhillis/5812837 to your computer and use it in GitHub Desktop.
This function returns a list of items with the comma, comma & format for a list of strings.
def commacommaand(items):
return ', '.join(items)[::-1].replace(',', '& ', 1)[::-1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment