From 9b07639364f2586815b10fcec5cf209b169241a8 Mon Sep 17 00:00:00 2001 From: Logen <47022821+Logenleedev@users.noreply.github.com> Date: Sat, 7 Jan 2023 14:08:19 -0600 Subject: [PATCH] fix minor code style --- problems/0151.翻转字符串里的单词.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problems/0151.翻转字符串里的单词.md b/problems/0151.翻转字符串里的单词.md index a12d8f76..dc12ae23 100644 --- a/problems/0151.翻转字符串里的单词.md +++ b/problems/0151.翻转字符串里的单词.md @@ -442,7 +442,7 @@ class Solution: while left <= right and s[left] == ' ': #去除开头的空格 left += 1 while left <= right and s[right] == ' ': #去除结尾的空格 - right = right-1 + right -= 1 tmp = [] while left <= right: #去除单词中间多余的空格 if s[left] != ' ':