Skip to content

Instantly share code, notes, and snippets.

@Poorvak
Created January 7, 2019 04:47
Show Gist options
  • Save Poorvak/10bac982c1fe02dc6e7c098da49a67a6 to your computer and use it in GitHub Desktop.
Save Poorvak/10bac982c1fe02dc6e7c098da49a67a6 to your computer and use it in GitHub Desktop.
Reverse words in a given string
' '.join(input().split(' ')[::-1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment