fork download
  1. x = [1, 2, 3, 4, 5]
  2. y = [2, 4]
  3.  
  4. def remove_duplicados(l1, l2):
  5. return [i for i in l1 if i not in l2]
  6.  
  7. z = remove_duplicados(x, y)
  8.  
  9. print(type(z)) # <class 'list'>
Success #stdin #stdout 0.04s 9324KB
stdin
Standard input is empty
stdout
<class 'list'>