[Leetcode,python] Reverse String 反转字符串
2016-08-03 09:35
387 查看
问题描述:
Write a function that takes a string as input and returns the string reversed.
Example:
Given s = "hello", return "olleh".
解决方案:
Write a function that takes a string as input and returns the string reversed.
Example:
Given s = "hello", return "olleh".
解决方案:
class Solution(object): def reverseString(self, s): """ :type s: str :rtype: str """ return s[::-1]
相关文章推荐
- [Leetcode,python] Reverse String 反转字符串
- [Leetcode,python] Reverse String 反转字符串
- LeetCode--Reverse String 反转字符串(Python)
- [Leetcode,python] Reverse String 反转字符串
- [Leetcode,python] Reverse String 反转字符串
- [Leetcode,python] Reverse String 反转字符串
- [Leetcode,python] Reverse String 反转字符串
- [Leetcode,python] Reverse String 反转字符串
- LeetCode----344. Reverse String 字符串反转
- [leetcode, python] Reverse Words in a String 反转字符串
- [leetcode, python] Reverse Words in a String 反转字符串
- [leetcode, python] Reverse Words in a String 反转字符串
- [leetcode, python] Reverse Words in a String 反转字符串
- [LeetCode]344. Reverse String(反转字符串)
- [leetcode, python] Reverse Words in a String 反转字符串
- 【LeetCode】字符串反转函数的几个算法 Reverse String
- [leetcode, python] Reverse Words in a String 反转字符串
- [leetcode, python] Reverse Words in a String 反转字符串
- LeetCode344——Reverse String(将字符串反转)
- LeetCode Reverse String(字符串反转)