Last active
May 26, 2019 10:57
-
-
Save Linus-Albertus/6ebce22bca6d5c2a8337478964434fab to your computer and use it in GitHub Desktop.
[reverse phrase] Take a phrase and reverse it
This file contains 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
original_phrase = 'foo bar' | |
reversed_list = [word for word in reversed(original_phrase.split())] | |
reversed_phrase = ' '.join(reversed_list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment