Remove redundant `break` in the for loop
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 😄 .
This commit is contained in:
parent
e8d1a1a36b
commit
88ca27562e
|
|
@ -125,8 +125,6 @@ class Solution:
|
|||
if record[i] != 0:
|
||||
#record数组如果有的元素不为零0,说明字符串s和t 一定是谁多了字符或者谁少了字符。
|
||||
return False
|
||||
#如果有一个元素不为零,则可以判断字符串s和t不是字母异位词
|
||||
break
|
||||
return True
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue