MCQ Answer

How do you concatenate two QuerySets into one list?

How do you concatenate two QuerySets into one list?

How do you concatenate two QuerySets into one list?
Topic : Models and Databases

A. result = list(query_set_1 | query_set_2)

B. from itertools import chain result = list(chain(query_set_1, query_set_2))

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

D. result = query_set_1 + query_set_2




Correct Answer is :

B. from itertools import chain result = list(chain(query_set_1, query_set_2))



Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2024 Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz