题解 | #句子逆序#
句子逆序
https://www.nowcoder.com/practice/48b3cb4e3c694d9da5526e6255bb73c3
import sys for line in sys.stdin: a = list(line.strip().split()) print(" ".join(a[::-1])) # 转list 再反转
句子逆序
https://www.nowcoder.com/practice/48b3cb4e3c694d9da5526e6255bb73c3
import sys for line in sys.stdin: a = list(line.strip().split()) print(" ".join(a[::-1])) # 转list 再反转
相关推荐