0 votes
1 view
in Python by (19.9k points)

Given two lists, can we obtain all the elements that are present in one list but not there in another?

1 Answer

0 votes
by (25.1k points)
edited by

You can do it like this:

difference = list(set(list1) - set(list2))

You can learn more about python by watching this youtube video: 

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...