Files
PS/leetcode/344.py
Gyubin Han dede0dca01 leetcode
2025-02-19 14:09:55 +09:00

8 lines
223 B
Python

class Solution:
def reverseString(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
for i in range(len(s)//2):
s[i],s[-i-1]=s[-i-1],s[i]