*** empty log message ***
This commit is contained in:
parent
67b0bd75b9
commit
e757277abd
|
|
@ -101,3 +101,15 @@ def doc(obj):
|
|||
(isinstance(obj, types.FunctionType)):
|
||||
print obj.__doc__
|
||||
|
||||
def intersection(a, b):
|
||||
"""
|
||||
intersection(list, list):
|
||||
"""
|
||||
c = a + b
|
||||
d = []
|
||||
for i in c:
|
||||
if (i in a) and (i in b):
|
||||
# make it unique, like a set
|
||||
if (i not in d):
|
||||
d.append(i)
|
||||
return d
|
||||
|
|
|
|||
Loading…
Reference in New Issue