344. Reverse String [E]

来源:互联网 发布:iphone抢购软件 编辑:程序博客网 时间:2024/04/30 15:05

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

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


Subscribe to see which companies asked this question


不能更简单。。。。。


class Solution(object):
    def reverseString(self, s):

        return s[::-1]

0 0