- code
class Solution:
def reverseString(self, s):
"""
:type s: str
:rtype: str
"""
s = list(s)
n = len(s)
for i in range(n//2):
s[i], s[~i] = s[~i], s[i]
return "".join(s)
# return s[::-1]