Created
June 5, 2019 13:19
-
-
Save SilvaEmerson/cc09999609e37a45e89060a5b20afc4a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def split_by_comma(fn): | |
def wrapper(sentence): | |
return fn(sentence).split(',') | |
return wrapper | |
@split_by_comma | |
def transform_content(content): | |
return content.swapcase() | |
transform_content('some, Example') | |
#returns: | |
#['SOME', 'eXAMPLE'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment