Skip to content

Instantly share code, notes, and snippets.

@SilvaEmerson
Created June 5, 2019 11:41
Show Gist options
  • Save SilvaEmerson/97fea990172d8938c2e91597905d78b3 to your computer and use it in GitHub Desktop.
Save SilvaEmerson/97fea990172d8938c2e91597905d78b3 to your computer and use it in GitHub Desktop.
Split function HOFed
def split_by(character):
return lambda content: content.split(character)
split_by_comma = split_by(', ')
split_by_comma('This, Is, A, Content, Example')
#result:
#['This', 'Is', 'A', 'Content', 'Example']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment