leetcode -- Reverse Words in a String -- 太简单,忽略

来源:互联网 发布:淘宝手表正品店 编辑:程序博客网 时间:2024/06/16 04:17

https://leetcode.com/problems/reverse-words-in-a-string/

class Solution(object):    def reverseWords(self, s):        """        :type s: str        :rtype: str        """        return " ".join(s.split()[::-1])
0 0