The following code will convert the entire result set (Cursor) into a list:
myresults = list(mydb.mycollection.find())
This is fine for relatively small result sets, as you are pulling everything into memory.
The following code will convert the entire result set (Cursor) into a list:
myresults = list(mydb.mycollection.find())
This is fine for relatively small result sets, as you are pulling everything into memory.