[Django]-Queryset v/s List Django

2👍

List of Objects is evaluated,
Queryset isn’t unless you perform any computation on the data.

List of Objects will consume RAM space, Queryset won’t that much.

You can refer Queryset further in the code without actually dealing with data in your memory, list of objects won’t allow you to manipulate data that easily.

This is what I think, others can add to it.

1👍

QuerySet:

  • can store multiple objects from your database.
  • is a special and original type in Django but not in Python.

List:

  • can store multiple values.
  • is one of 4 built-in types in Python.

Leave a comment