344. Reverse String

2017-08-12  本文已影响0人  腹黑君

Write a function that takes a string as input and returns the string reversed.

Example:
Given s = "hello", return "olleh".

    def reverseString(self, s):
        """
        :type s: str
        :rtype: str
        """
        return s[::-1]

。。。

上一篇 下一篇

猜你喜欢

热点阅读