[Answer]-Django-How to combine two object set & remove the common objects in these two sets

1👍

You can try this using exclude() for objects in other set.

set1= book.objects.filter(name='Python')
set2= book.objects.filter(author_name='Mona')
non_common = set1.exclude(id__in=[o.id for o in set2])
👤Rohan

Leave a comment