I would like to return values from both lists that not in the other one:
bar = [ 1,2,3,4,5 ] foo = [ 1,2,3,6 ] returnNotMatches( a,b )
would r
Just use a list comprehension:
def returnNotMatches(a, b): return [[x for x in a if x not in b], [x for x in b if x not in a]]