We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43a5216 commit f5b08e2Copy full SHA for f5b08e2
names/names.py
@@ -18,7 +18,7 @@
18
# if name_1 == name_2:
19
# duplicates.append(name_1)
20
21
-duplicates = set(names_2).intersection(names_1)
+# duplicates = [ name for name in names_1 if name in names_2]
22
23
end_time = time.time()
24
print (f"{len(duplicates)} duplicates:\n\n{', '.join(duplicates)}\n\n")
@@ -28,3 +28,5 @@
28
# Python has built-in tools that allow for a very efficient approach to this problem
29
# What's the best time you can accomplish? Thare are no restrictions on techniques or data
30
# structures, but you may not import any additional libraries that you did not write yourself.
31
+
32
+duplicates = set(names_2).intersection(names_1)
0 commit comments