fork download
  1. def remove_duplicados(l1, l2):
  2. return [i for i in l1 if i not in l2]
  3.  
  4. l1 = [1, 2, 3, 4]
  5. l2 = [1, 2, 5, 6]
  6.  
  7. print(remove_duplicados(l1, l2))
Success #stdin #stdout 0.04s 9252KB
stdin
Standard input is empty
stdout
[3, 4]