-
Notifications
You must be signed in to change notification settings - Fork 0
/
incorrect.json
270 lines (270 loc) · 24.4 KB
/
incorrect.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
[
"common = list(set(l1).intersection(l2))",
"import numpy as np\ncommon = np.intersect1d(l1, l2).tolist()",
"common = list(set(l1) & set(l2))",
"common = []\nfor i in set(l1):\n if i in set(l2):\n common.append(i)",
"from functools import reduce\ncommon = list(reduce(set.intersection, [set(l1), set(l2)]))",
"import numpy as np\nl1_np = np.array(l1)\nl2_np = np.array(l2)\ncommon = list(np.intersect1d(l1_np, l2_np))",
"common = []\nfor i in l1:\n if i in l2:\n common.append(i)\ncommon = list(set(common))",
"from functools import reduce\ncommon = reduce(lambda x, y: x if y in x else x + [y], l1, [])",
"common = [i for i in set(l1) if i in set(l2)]",
"from functools import reduce\ncommon = list(reduce(lambda x, y: set(x) & set(y), [l1, l2]))",
"import itertools\ncommon = list(itertools.filterfalse(lambda x: x not in l1, l2))",
"import numpy as np\ncommon = list(np.intersect1d(l1, l2))",
"from functools import reduce\ncommon = reduce(lambda a, b: a if b in l2 else a, l1, [])",
"from functools import reduce\ncommon = reduce(lambda a, b: a if b in l2 else a + [b], l1, [])",
"common = filter(lambda x: x in l1, l2)",
"common = []\nfor i in l1:\n if i in l2 and i not in common:\n common.append(i)",
"common = []\nfor i in l1:\n if l2.count(i) > 0 and common.count(i) == 0:\n common.append(i)",
"common = set(l1)\ncommon.intersection_update(set(l2))\ncommon = list(common)",
"common = list(set(l1).intersection(set(l2)))",
"import functools\nimport operator\ncommon = list(functools.reduce(operator.and_, (set(sub) for sub in [l1, l2])))",
"import itertools\ncommon = [item for (item, count) in itertools.Counter(l1 + l2).items() if count > 1]",
"common = []\nfor i in l1:\n for j in l2:\n if i == j:\n common.append(i)",
"common = [i for i in l1 if i in l2]\ncommon = list(set(common))",
"from functools import reduce\ncommon = list(reduce(lambda x, y: x & y, [set(l1), set(l2)]))",
"common = list(filter(lambda x: x in l2, l1))\ncommon = list(set(common))",
"common = list(set([i for i in l1 if i in l2]))",
"common = list(set(filter(lambda i: i in l2, l1)))",
"common = filter(lambda x: x in l1, l2)\ncommon = list(common)",
"from functools import reduce\ncommon = list(reduce(lambda x, y: x & y, (set(l1), set(l2))))",
"import itertools\ncommon = [item for (item, count) in itertools.groupby(sorted(l1 + l2)) if l1.count(item) > 0 and l2.count(item) > 0]",
"import numpy as np\nl1_np = np.array(l1)\nl2_np = np.array(l2)\ncommon = np.intersect1d(l1_np, l2_np).tolist()",
"import numpy as np\ncommon = np.intersect1d(l1, l2)",
"from functools import reduce\ncommon = reduce(lambda x, y: x if y in l1 else x, l2, [])",
"common = set(l1) & set(l2)",
"from functools import reduce\ncommon = reduce(lambda x, y: x & y, [set(l1), set(l2)])",
"from functools import reduce\ncommon = list(reduce(lambda i, j: i & j, (set(l1), set(l2))))",
"common = []\nfor i in l1:\n if i in l2:\n if i not in common:\n common.append(i)",
"common = [i for i in l1 if i in l2 and l1.count(i) == 1]",
"common = []\nfor i in set(l1):\n if i in l2:\n common.append(i)",
"from collections import Counter\nl1_counter = Counter(l1)\nl2_counter = Counter(l2)\ncommon = list((l1_counter & l2_counter).elements())",
"common = list(set([x for x in l1 if l1.count(x) > 1 and x in l2]))",
"common = list(set([x for x in l1 if l2.count(x) > 1]))",
"common = [x for x in set(l1) if x in l2]",
"common = list(filter(lambda x: l1.count(x) > 1 and x in l2, l1))",
"common = list(filter(lambda x: l2.count(x) > 1, l1))",
"from collections import Counter\ncommon = [item for (item, count) in (Counter(l1) & Counter(l2)).items() for _ in range(count)]",
"common = []\nfor i in l1:\n for j in l2:\n if i == j and i not in common:\n common.append(i)",
"common = list(set(filter(lambda x: x in l2, l1)))",
"from functools import reduce\ncommon = reduce(lambda x, y: x if y in l2 else x + [y], l1, [])\ncommon = list(set(common))",
"from functools import reduce\ncommon = reduce(lambda x, y: x if y in l2 else x, l1, [])\ncommon = list(set(common))",
"common = list(filter(lambda x: x in l2, set(l1)))",
"from functools import reduce\ncommon = list(reduce(lambda i, j: i & j, (set(x) for x in [l1, l2])))",
"common = set(l1).intersection(l2)",
"from functools import reduce\ncommon = reduce(lambda x, y: x & y, (set(l1), set(l2)))",
"import itertools\ncommon = [item for (item, group) in itertools.groupby(sorted(l1 + l2)) if list(group) > 1]",
"import numpy as np\n(l1_np, l2_np) = (np.array(l1), np.array(l2))\ncommon = l1_np[np.isin(l1_np, l2_np)].tolist()",
"import numpy as np\nl1_np = np.array(l1)\nl2_np = np.array(l2)\ncommon = l2_np[np.isin(l2_np, l1_np)].tolist()",
"common = set(l1).intersection(set(l2))",
"common = set(l1)\ncommon.intersection_update(set(l2))",
"common = set()\nfor i in l1:\n if i in l2:\n common.add(i)",
"common = {i for i in l1 if i in l2}",
"import pandas as pd\ncommon = pd.Series(list(set(l1).intersection(set(l2))))",
"from operator import and_\nfrom functools import reduce\ncommon = reduce(and_, map(set, [l1, l2]))",
"common = list(filter(lambda i: l1.count(i) == 1 and i in l2, l1))",
"common = []\nfor i in l1:\n if i in l2 and l1.count(i) == 1:\n common.append(i)",
"import numpy as np\n(l1_np, l2_np) = (np.array(l1), np.array(l2))\ncommon = [i for i in l1_np if i in l2_np and list(l1_np).count(i) == 1]",
"from collections import Counter\nl1_counter = Counter(l1)\ncommon = [i for i in l1 if i in l2 and l1_counter[i] == 1]",
"common = []\nfor i in set(l1):\n if l1.count(i) == 1 and i in l2:\n common.append(i)",
"from functools import reduce\ncommon = reduce(lambda acc, i: acc + [i] if i in l2 and l1.count(i) == 1 else acc, l1, [])",
"common = list(set([i for i in l1 if i in l2 and l1.count(i) == 1]))",
"common = [i for i in set(l1) if i in l2 and l1.count(i) == 1]",
"common = []\nfor i in set(l1):\n for j in set(l2):\n if i == j:\n common.append(i)",
"import collections\ncommon = [item for (item, count) in collections.Counter(l1).items() if count > 1 and item in l2]",
"common = list(filter(lambda x: l1.count(x) > 1 and x in l2, set(l1)))",
"common = [x for x in set(l1) if l1.count(x) > 1 and x in l2]",
"common = []\nfor x in set(l1):\n if l1.count(x) > 1 and x in l2:\n common.append(x)",
"common = list(set(filter(lambda x: l1.count(x) > 1, l1)) & set(l2))",
"common = []\nfor x in l1:\n if l1.count(x) > 1 and x in l2 and (x not in common):\n common.append(x)",
"common = list(set(filter(lambda x: l1.count(x) > 1 and x in l2, l1)))",
"common = list(set((x for x in l1 if l1.count(x) > 1)).intersection(l2))",
"common = list(set([x for x in l1 if l1.count(x) > 1]).intersection(set(l2)))",
"common = list(set((x for x in l1 if l1.count(x) > 1 and x in l2)))",
"common = [x for x in l1 if l2.count(x) > 1]",
"from collections import Counter\ncommon = [item for (item, count) in Counter(l1).items() if count > 1 and item in l2]",
"common = list(set(filter(l2.__contains__, l1)))",
"common = [x for x in set(l1) if l2.count(x) > 1]",
"common = list(set((x for x in l1 if l2.count(x) > 1)))",
"from functools import reduce\ncommon = reduce(lambda x, y: x + y, [i if i in l2 else '' for i in l1])",
"from functools import reduce\ncommon = list(reduce(lambda a, b: a & b, (set(l1), set(l2))))",
"import numpy as np\ncommon = [i for i in l1 if i in np.unique(l2)]",
"common = ''\nfor i in l1:\n if i in l2:\n common += i",
"common = ''.join([i for i in l1 if i in l2])",
"from functools import reduce\ncommon = reduce(lambda x, y: x + y, filter(lambda i: i in l2, l1))",
"common = ''\nfor i in l1:\n common = common + i if i in l2 else common",
"import numpy as np\nl1_np = np.array(l1)\nl2_np = np.array(l2)\ncommon = ''.join(l1_np[np.isin(l1_np, l2_np)])",
"from operator import add\nfrom functools import reduce\ncommon = reduce(add, filter(lambda x: x in l2, l1))",
"common = ''\nfor i in l1:\n try:\n l2.index(i)\n common += i\n except ValueError:\n pass",
"from numpy import intersect1d\ncommon = list(intersect1d(l1, l2))",
"common = [x for x in l1 for y in l2 if x == y]",
"import itertools\ncommon = [value for value in itertools.filterfalse(lambda x: x not in l1, l2)]",
"import numpy as np\ncommon = [value for value in np.intersect1d(l1, l2)]",
"common = list(filter(lambda item: l1.count(item) > 1 and l2.count(item) > 1, set(l1 + l2)))",
"import functools\nimport operator\ncommon = list(functools.reduce(operator.and_, map(set, (l1, l2))))",
"import pandas as pd\ncommon = list(pd.Series(l1[l1.isin(l2)]))",
"common = set(filter(lambda x: x in l2, l1))",
"import numpy as np\ncommon = set(np.intersect1d(l1, l2))",
"common = [value for value in set(l1) if value in set(l2)]\ncommon = set(common)",
"common = set()\nfor i in l1:\n for j in l2:\n if i == j:\n common.add(i)",
"import numpy as np\ncommon = np.array([value for value in l1 if value in l2])",
"import numpy as np\ncommon_set = set(l1).intersection(l2)\ncommon = np.array(list(common_set))",
"import numpy as np\ncommon = []\nfor value in l1:\n if value in l2:\n common.append(value)\ncommon = np.array(common)",
"import numpy as np\ncommon = []\nfor value in l1:\n if value in l2 and value not in common:\n common.append(value)\ncommon = np.array(common)",
"import functools\ncommon = list(functools.reduce(lambda x, y: x if y in l2 else x, l1, []))",
"import numpy as np\n(l1_np, l2_np) = (np.array(l1), np.array(l2))\ncommon = np.intersect1d(l1_np, l2_np).tolist()",
"from operator import contains\ncommon = list(filter(lambda x: contains(l1, x), l2))",
"import itertools\ncommon = list(set([item for item in itertools.chain(l1, l2) if l1.count(item) > 0 and l2.count(item) > 0]))",
"common = [item for item in set(l1 + l2) if l1.count(item) > 0 and l2.count(item) > 0]",
"from functools import reduce\ncommon = list(reduce(set.intersection, [set(item) for item in [l1, l2]]))",
"from operator import and_\nfrom functools import reduce\ncommon = list(reduce(and_, [set(l1), set(l2)]))",
"import numpy as np\ncommon = list(set(l1).intersection(np.unique(l2)))",
"import numpy as np\ncommon = list(filter(lambda x: x in np.unique(l2), l1))",
"import numpy as np\ncommon = [i for i in set(l1) if i in np.unique(l2)]",
"import numpy as np\ncommon = []\n[common.append(i) for i in l1 if i in np.unique(l2) and i not in common]",
"import numpy as np\ncommon = [i for i in l1 if i in set(np.unique(l2))]",
"import numpy as np\ncommon = list(set(l1) & set(np.unique(l2)))",
"import numpy as np\ncommon = []\nfor i in l1:\n if i in np.unique(l2):\n common.append(i)",
"import numpy as np\ncommon = []\nfor i in l1:\n if i in list(np.unique(l2)):\n common.append(i)",
"import numpy as np\ncommon = []\nfor i in l1:\n if i in set(np.unique(l2)):\n common.append(i)",
"import numpy as np\ncommon = np.intersect1d(np.array(l1), np.array(l2)).tolist()",
"import functools\ncommon = list(functools.reduce(lambda l, e: l.add(e) or l, map(set, [l1, l2])))",
"from functools import reduce\ncommon = list(reduce(lambda a, b: set(a) & set(b), (l1, l2)))",
"common = []\nfor i in range(len(l1)):\n for j in range(len(l2)):\n if l1[i] == l2[j]:\n common.append(l1[i])",
"import numpy as np\n(l1_np, l2_np) = (np.array(l1), np.array(l2))\ncommon = list(l1_np[np.in1d(l1_np, l2_np)])",
"import itertools\ncommon = list((i for i in itertools.chain(l1, l2) if i in l1 and i in l2))",
"import functools\nimport operator\ncommon = list(functools.reduce(operator.iand, [set(l1), set(l2)]))",
"import itertools\ncommon = list(itertools.filterfalse(set(l1).__isub__, l2))",
"from functools import reduce\ncommon = list(reduce(lambda a, b: a.intersection(b), (set(l1), set(l2))))",
"common_elements_set = set(l1)\ncommon = [i for i in l2 if i in common_elements_set]",
"from functools import reduce\ncommon = list(reduce(set.intersection, (set(l1), set(l2))))",
"from collections import Counter\ncommon = list((Counter(l1) & Counter(l2)).elements())",
"import numpy as np\ncommon = np.intersect1d(np.array(l1), np.array(l2))",
"import numpy as np\nset_l1 = set(l1)\nset_l2 = set(l2)\ncommon = np.array(list(set_l1.intersection(set_l2)))",
"import functools\nimport operator\ndef intersections(a, b):\n return list(functools.reduce(operator.and_, [set(a), set(b)]))\ncommon = intersections(l1, l2)",
"from functools import reduce\ncommon = reduce(lambda x, y: x + y if y in l2 else x, l1, [])",
"set_l1 = set(l1)\nset_l2 = set(l2)\ncommon = list(set_l1 & set_l2)",
"from functools import reduce\ncommon = reduce(lambda a, i: a + [i] if i in l1 else a, l2, [])",
"import functools\ncommon = list(functools.reduce(lambda l1, l2: set(l1).intersection(l2), (l1, l2)))",
"from functools import reduce\ncommon = [v for v in reduce(lambda a, b: a + b, l1) if v in l2]",
"from collections import Counter\ncommonCounter = Counter(l1) & Counter(l2)\ncommon = list(commonCounter.elements())",
"from functools import reduce\ncommon = []\n[common.append(x) for x in l1 + l2 if x not in common]",
"from functools import reduce\ncommon = list(set(l1).intersection(*l2))",
"common_elements_set = set(l1)\ncommon = list(filter(common_elements_set.__contains__, l2))",
"common_elements_set = set(l1)\ncommon = [x for x in l2 if common_elements_set.__contains__(x)]",
"common_elements_set = set(l1)\ncommon = cut_list = list(filter(common_elements_set.__contains__, l2))",
"common = [value for value in l1 if value in set(l2)]",
"set_l1 = set(l1)\nset_l2 = set(l2)\ncommon = [value for value in set_l1 if value in set_l2]",
"import numpy as np\n(l1_np, l2_np) = (np.array(l1), np.array(l2))\ncommon_np = np.intersect1d(l1_np, l2_np)\ncommon = common_np.tolist()",
"import numpy as np\n(l1_array, l2_array) = (np.array(l1), np.array(l2))\ncommon = list(np.intersect1d(l1_array, l2_array).tolist())",
"from collections import Counter\n(count_l1, count_l2) = (Counter(l1), Counter(l2))\ncommon = list((count_l1 & count_l2).elements())",
"from functools import reduce\ncommon = reduce(lambda a, b: a if a in l2 else None, l1, [])",
"common = filter(lambda a: a in l2, set(l1))\ncommon = list(common)",
"common = [value for value in l1 if value in l2]\ncommon = set(common)",
"from operator import contains\ncommon = [i for i in set(l1) if contains(set(l2), i)]",
"set_l1 = set(l1)\ncommon = list(set_l1.intersection(l2))",
"common = [value for value in set(l1) & set(l2)]",
"import functools\ncommon = list(set(functools.reduce(lambda l1, l2: filter(lambda x: x in l1, l2), (l1, l2))))",
"common = []\n[count for (count, item) in enumerate(l1) if l1[count] in l2]",
"common = list((x for x in set(l1) & set(l2)))",
"import itertools\ncommon = list(itertools.filterfalse(lambda x: l1.count(x) != l2.count(x), set(l1)))",
"def common_elements(list1, list2):\n common = []\n for element in list1:\n if element in list2 and element not in common:\n common.append(element)\n return common\ncommon = common_elements(l1, l2)",
"from collections import Counter\nl1_counts = Counter(l1)\nl2_counts = Counter(l2)\ncommon_counts = l1_counts & l2_counts\ncommon = [item for item in common_counts.elements()]",
"import numpy as np\n(l1, l2) = (np.array(l1), np.array(l2))\ncommon = list(np.intersect1d(l1, l2))",
"import functools\ncommon = list(functools.reduce(lambda x, y: x & y, [set(l1), set(l2)]))",
"from operator import itemgetter\nfrom itertools import groupby\nsorted_l1_l2 = sorted(l1 + l2)\ncommon = [key for (key, group) in groupby(sorted_l1_l2) if len(list(group)) > 1]",
"def intersection(l1, l2):\n temp = set(l2)\n common = [value for value in l1 if value in temp]\nreturn common",
"AA = set(l1)\nBB = set(l2)\nif len(AA) < len(BB):\n B = AA\nelse:\n B = BB\ncommon = {i for i in B if i in B}",
"import numpy as np\ncommon = list(np.intersect1d(np.array(l1), np.array(l2)))",
"from functools import reduce\nc1 = set(l1)\nc2 = set(l2)\ncommon = list(reduce(lambda x, y: x & y, (c1, c2)))",
"import numpy as np\ncommon = np.array(list(set(l1) & set(l2)))",
"from functools import reduce\ncommon = reduce(lambda l1, l2: list(set(l1).intersection(l2)), [l1, l2])",
"import numpy as np\n(set_l1, set_l2) = (set(l1), set(l2))\nintermediate = [element for element in set_l1 if element in set_l2]\ncommon = np.array(intermediate)",
"import numpy as np\ninter = filter(set(l1).__contains__, l2)\ncommon = np.array(list(inter))",
"import numpy as np\ncommon = np.array([item for item in set(l1) if item in set(l2)])",
"import numpy as np\ncommon_in_sets = set(l1) & set(l2)\ncommon = np.array(list(common_in_sets))",
"import numpy as np\nset_l2 = set(l2)\ncommon = np.array([item for item in l1 if item in set_l2])",
"from functools import reduce\ncommon = list(reduce(lambda a, b: set(a).intersection(b), (l1, l2)))",
"import itertools\ncommon = [item for (item, count) in itertools.groupby(sorted(l1 + l2)) if l1.count(item) > 1 and l2.count(item) > 1]",
"import functools\ncommon = list(functools.reduce(lambda x, y: x if y in l2 else x, l1))",
"import functools\ncommon = functools.reduce(lambda x, y: x if y in l2 else x, l1, [])",
"import itertools\ncommon = [i for (i, _) in itertools.groupby(sorted(l1 + l2)) if i in l1 and i in l2]",
"import functools\ncommon = list(functools.reduce(lambda a, b: set(a) & set(b), [l1, l2]))",
"import itertools\ncommon = [value for value in itertools.chain(l1, l2) if value in l1 and value in l2]",
"import numpy as np\nl1_np = np.array(l1)\nl2_np = np.array(l2)\ncommon = list(l1_np[np.in1d(l1_np, l2_np)])",
"common = []\nset_l2 = set(l2)\nfor i in l1:\n if i in set_l2 and i not in common:\n common.append(i)",
"common = set()\nfor x in l1:\n for y in l2:\n if x == y:\n common.add(x)\n break",
"import numpy as np\n(l1_np, l2_np) = (np.array(l1), np.array(l2))\ncommon = set(np.intersect1d(l1_np, l2_np))",
"from operator import and_\nfrom functools import reduce\ncommon = list(reduce(and_, map(set, [l1, l2])))",
"import numpy as np\nl1_np = np.array(l1)\nl2_np = np.array(l2)\ncommon = l1_np[np.in1d(l1_np, l2_np)].tolist()",
"common = [i for i in l1 if i in l2 and i not in common]",
"common = list(filter(lambda x: x in l1 and x in l2, set(l1)))",
"common = list(set((i for i in l1 if i in l2)))",
"common = []\nfor i in l1:\n if l2.count(i) > 0 and i not in common:\n common.append(i)",
"import pandas as pd\ncommon = list(pd.Series(l1)[pd.Series(l1).isin(l2)].unique())",
"from operator import eq\ncommon = list(filter(eq, zip(l1, l2)))",
"from operator import eq\ncommon = list(filter(eq, l1, l2))",
"import numpy as np\nfrom operator import eq\n(l1_unique, l1_index) = np.unique(l1, return_index=True)\n(l2_unique, l2_index) = np.unique(l2, return_index=True)\ncommon = list(filter(eq(l1_unique, l1_index), l2_unique))",
"import numpy as np\nl1_unique = np.unique(l1)\nl2_unique = np.unique(l2)\ncommon = [item for item in l1_unique if item in l2_unique]",
"import numpy as np\nl1_unique = np.unique(l1)\nl2_unique = np.unique(l2)\ncommon = list(set(l1_unique).intersection(l2_unique))",
"import numpy as np\nl1_unique = np.unique(l1)\nl2_unique = np.unique(l2)\ncommon = list(filter(lambda x: x in l2_unique, l1_unique))",
"import numpy as np\n(l1_unique, l1_index) = np.unique(l1, return_index=True)\n(l2_unique, l2_index) = np.unique(l2, return_index=True)\ncommon = []\nfor item in l1_unique:\n if item in l2_unique:\n common.append(item)",
"import numpy as np\ncommon = [item for item in np.unique(l1) if item in np.unique(l2)]",
"import numpy as np\ncommon = np.intersect1d(np.unique(l1), np.unique(l2)).tolist()",
"import numpy as np\ncommon = list(set(np.unique(l1)).intersection(set(np.unique(l2))))",
"import numpy as np\ncommon = list(set(np.unique(l1)) & set(np.unique(l2)))",
"import numpy as np\ncommon = list(filter(lambda x: x in np.unique(l2), np.unique(l1)))",
"import numpy as np\ncommon = [x for x in np.unique(l1) for y in np.unique(l2) if x == y]",
"import functools\ncommon = list(functools.reduce(lambda a, b: set(a).intersection(b), [l1, l2]))",
"from functools import reduce\ncommon = reduce(lambda x, y: x + y, [i for i in l1 if i in l2])",
"from functools import reduce\ncommon = reduce(lambda a, b: a if b in l2 else a + [], l1)",
"from operator import and_\nfrom functools import reduce\ncommon = list(reduce(and_, [set(item) for item in [l1, l2]]))",
"import functools\ncommon = list(functools.reduce(lambda l1, l2: set(l1).intersection(l2), [l1, l2]))",
"import pandas as pd\ncommon = pd.Series(list(set(l1))).isin(list(set(l2)))",
"import numpy as np\nl1 = np.array(l1)\nl2 = np.array(l2)\ncommon = np.intersect1d(l1, l2)",
"import itertools\ncommon = set(itertools.chain(l1)).intersection(l2)",
"import itertools\ncommon = [i for (i, _) in itertools.groupby(sorted(filter(lambda x: l1.count(x) > 0, l2)))]",
"common = sum([i for i in l1 if i in l2])",
"common = 0\nfor i in l1:\n if i in l2:\n common += i",
"import numpy as np\ncommon = np.sum([i for i in l1 if i in l2])",
"common = 0\nfor i in l1:\n common += i if i in l2 else 0",
"common = sum((i for i in l1 if i in l2))",
"common = sum(filter(lambda i: i in l2, l1))",
"from operator import add\nfrom functools import reduce\ncommon = reduce(add, [i for i in l1 if i in l2])",
"common = 0\nfor i in l1:\n common = common + i if i in l2 else common",
"common = []\nl1_set = set(l1)\nl2_set = set(l2)\nfor i in l1_set:\n if i in l2_set:\n common.append(i)",
"from operator import eq\ncommon = list(filter(eq, set(l1), set(l2)))",
"common = set(l1) & set(l2)\ncommon = list(common)",
"from functools import reduce\ncommon = reduce(lambda a, b: a if b in l2 else a, l1)",
"common = [i for i in l1 if i in l2 and i not in set(l1)]",
"common = []\nl1_set = set(l1)\nl2_set = set(l2)\ncommon = [i for i in l1_set if i in l2_set]",
"import numpy as np\nl1_array = np.array(l1)\nl2_array = np.array(l2)\ncommon = list(set(l1_array) & set(l2_array))",
"import functools\ncommon = list(functools.reduce(lambda x, y: set(x) & set(y), [l1, l2]))",
"from functools import reduce\ncommon = reduce(lambda a, b: a & b, (set(l1), set(l2)))",
"import itertools\ncommon = list(itertools.filterfalse(set(l1).__contains__, l2))",
"import functools\ncommon = list(functools.reduce(lambda x, y: x & y, (set(l1), set(l2))))",
"common = [value for value in set(l1).intersection(l2)]",
"common = [value for value in l1 + l2 if value in l1 and value in l2]",
"import numpy as np\n(l1_np, l2_np) = (np.array(l1), np.array(l2))\ncommon = l1_np[np.in1d(l1_np, l2_np)].tolist()",
"import functools\ncommon = list(functools.reduce(lambda a, b: a & b, (set(l1), set(l2))))",
"common = []\n[common.append(i) for i in l1 if i in l2 and i not in common]",
"import functools\ncommon = list(functools.reduce(lambda a, b: a.intersection(b), (set(l1), set(l2))))",
"from functools import reduce\ncommon = list(reduce(lambda a, b: set(a) & set(b), [l1, l2]))",
"import sys\ncommon = list(sys.modules[__name__].__builtins__['filter'](l1.__contains__, l2))",
"from functools import reduce\ncommon = reduce(lambda x, y: x if y in x else x + [y], [[]] + [i for i in l1 if i in l2])",
"from operator import eq\ncommon = list(filter(eq(*map(set, [l1, l2]))))",
"import functools\ncommon = list(functools.reduce(lambda i, j: i & j, (set(l1), set(l2))))",
"temp = [x for x in l1 if x in l2]\ncommon = list(dict.fromkeys(temp))",
"import itertools\ncommon = list(set(itertools.chain(*[item for item in l1 if item in l2])))",
"common = []\nfor element in l1:\n if element in l2:\n if common.count(element) == 0:\n common.append(element)",
"common = []\nfor i in l1:\n if i in set(l2):\n common.append(i)",
"from functools import reduce\ncommon = list(reduce(lambda x, y: x & y, map(set, [l1, l2])))",
"import functools\nimport operator\ncommon = list(functools.reduce(operator.and_, (set(l1), set(l2))))",
"from functools import reduce\ncommon = reduce(lambda result, value: result + [value] if value in set(l2) else result, l1, [])",
"common = list((x for x in set(l1) if x in set(l2)))",
"common = list(filter(set(l2).__contains__, l1))",
"from functools import reduce\ncommon = reduce(lambda x, y: x + y, filter(lambda x: x in l2, l1))",
"temp = set(l2)\n\ndef common_items(l1):\n for i in l1:\n if i in temp:\n yield i\ncommon = list(common_items(l1))",
"common = [l1[i] for i in range(len(l1)) if l1[i] in set(l2)]",
"import pandas as pd\ndf1 = pd.DataFrame(l1, columns=['Element'])\ndf2 = pd.DataFrame(l2, columns=['Element'])\ncommon = df1[df1.isin(df2)].dropna().values.tolist()"
]