aboutsummaryrefslogtreecommitdiffstats
path: root/890
diff options
context:
space:
mode:
Diffstat (limited to '890')
-rwxr-xr-x890/main.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/890/main.py b/890/main.py
index 2082679..10aa9e6 100755
--- a/890/main.py
+++ b/890/main.py
@@ -6,11 +6,11 @@ from typing import List
class Solution:
@staticmethod
def findAndReplacePattern(words: List[str], pattern: str) -> List[str]:
- def match(w):
- m1, m2 = {}, {}
+ def match(word):
+ map1, map2 = {}, {}
return all(
- (m1.setdefault(i, j), m2.setdefault(j, i)) == (j, i)
- for i, j in zip(w, pattern)
+ (map1.setdefault(i, j), map2.setdefault(j, i)) == (j, i)
+ for i, j in zip(word, pattern)
)
results = []