I have a list and I would to remove from it all elements that are contained into an other list.
So, I would to have something like to '
exclude' queryset but on a list.
Now this is my code:
list = Friend.objects.friends(self.request.user) i_am_blocking = User.objects.filter(blocks_received__user_blocking=self.request.user) is_blocking_me = User.objects.filter(blocks_set__user_blocked=self.request.user) blocked_users = list(chain(i_am_blocking, is_blocking_me))
and now I would to remove from '
list' all items that are contained into '
Is there a better way to make this?