def who_knows(a, b):
""" a and b are lists """
c = []
for i in a:
if is_mem(b, i):
c.append(i)
return uniqify(c)
def is_mem(a, elem):
for i in a:
if i == elem:
return True
return False
def uniqify(arr):
b = {}
for i in arr:
b[i] = 1
return b.keys()
vicky12345 0
Newbie Poster
JasonHippy 739
Practically a Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.