题解 | #翻转单词序列#
翻转单词序列
http://www.nowcoder.com/practice/3194a4f4cf814f63919d0790578d51f3
# -*- coding:utf-8 -*- class Solution: def ReverseSentence(self, s): # write code here return " ".join(reversed([i for i in s.split(" ")]))
翻转单词序列
http://www.nowcoder.com/practice/3194a4f4cf814f63919d0790578d51f3
# -*- coding:utf-8 -*- class Solution: def ReverseSentence(self, s): # write code here return " ".join(reversed([i for i in s.split(" ")]))
相关推荐