From 88ca27562e748e004ac75dfd9ad89c2fc8fc7f07 Mon Sep 17 00:00:00 2001 From: Yang Date: Sun, 26 Jun 2022 10:08:22 +0200 Subject: [PATCH] Remove redundant `break` in the for loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove redundant `break` in the for loop of python script. When the `return` is triggered, the for loop will break automatically. PS: really like your work! Thanks a lot 😄 . --- problems/0242.有效的字母异位词.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/problems/0242.有效的字母异位词.md b/problems/0242.有效的字母异位词.md index 8fd9c604..f1f7e6cf 100644 --- a/problems/0242.有效的字母异位词.md +++ b/problems/0242.有效的字母异位词.md @@ -125,8 +125,6 @@ class Solution: if record[i] != 0: #record数组如果有的元素不为零0,说明字符串s和t 一定是谁多了字符或者谁少了字符。 return False - #如果有一个元素不为零,则可以判断字符串s和t不是字母异位词 - break return True ```