Created
September 18, 2019 02:02
-
-
Save m2kar/315bdfb0581678d2f4159a6f7913b017 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
| """ | |
| 逆序 单词 | |
| """ | |
| s=input() | |
| if len(s)==0: | |
| print("") | |
| else: | |
| enddot=False | |
| if s[-1]==".": | |
| s=s.rstrip(".") | |
| enddot=True | |
| s2=" ".join(s.split()[::-1]) | |
| if enddot: | |
| print(s2+".") | |
| else: | |
| print(s2) | |
| print(,end="") |
Author
m2kar
commented
Sep 18, 2019


Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment