Say I have a model:
Class Person(models.Model): firstname = models.CharField() lastname = models.CharField() birthday = models.DateField() # etc.
Using python 3.5 version :
import operator import functools query = functools.reduce( operator.or_, (Q(firstname=fn, lastname=ln) for fn, ln in zip(first_list, last_list)) ) Person.objects.filter(query)