Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def destroy_elements(list1, list2):
- print([x for x in list1 if x not in list2]) #list comprehension
- destroy_elements([1, 2, 3], [4, 5]) #Example (the arguments must consist of two lists)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement