I am new to python and programming in general.I wanted to write a code which prints the similar elements from 2 lists .For example if a=[1,2,3,4,5] and b=[0,2,4,6] , I would want a c=[2,4]. Here is what I did:
def simi(a,b): a,b,c=[],[],[] for i in a: for j in b: if i==j: c.append(i) else: continue return (c)[python]