Leetcode刷题记录[python]——344 Reverse String

一、前言

  不是计算机专业出身,却有一颗程序猿的心。

  昨日开始leetcode第一次刷题,选择了菜鸟方式,从AC率最高且难度为Easy的题开始,不管题是简单还是难,都想做个记录,既是方便以后回顾,又是以此作为一个激励,督促自己每天都能有所进步。

二、题344 Reverse String

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

class Solution(object):
    def reverseString(self, s):
        """
        :type s: str
        :rtype: str
        """
        return s[::-1]
原文地址:https://www.cnblogs.com/Myoungs/p/5509504.html