Home / CSE MCQs / Django :: Discussion

Discussion :: Django

  1. How do you concatenate two QuerySets into one list?
  2. A.
    result = list(query_set_1 | query_set_2)
    B.

    from itertools import chain

    C.
    from django.db.models import Q result = Q(query_set_1) | Q(query_set_1)
    D.
    result = query_set_1 + query_set_2

    View Answer

    Workspace

    Answer : Option B

    Explanation :



Be The First To Comment