题解 | #句子逆序#
句子逆序
http://www.nowcoder.com/practice/48b3cb4e3c694d9da5526e6255bb73c3
words = input().strip().split() new_string = '' for i in range(len(words)-1,-1,-1): new_string = new_string +' '+ words[i] print(new_string.strip())
句子逆序
http://www.nowcoder.com/practice/48b3cb4e3c694d9da5526e6255bb73c3
words = input().strip().split() new_string = '' for i in range(len(words)-1,-1,-1): new_string = new_string +' '+ words[i] print(new_string.strip())
相关推荐