The data found in Python through find from MONGO, or the data returned through select, actually returns a cursor, and when you make a convenient one, the cursor points to the last,
So when you do the convenience again, there is a phenomenon of empty data.
WORKAROUND: Convert data through list () lists = list (data returned in MONGO)
But then there are new problems:
1.list converted data only refers to, not specified
2. When the data is too large, the performance of the fried chicken is bad when the data is converted.
Workaround:
1. Use namedtuple and Map object.
2. When using map and namedtuple, cursors use the Fetchall () method. Fetch all the results one line at a time, and then call the map method to map all the data to the Record object.
3. The returned map object can be traversed by calling the For method. The map object resembles a Record object list.
4.namedtuple generated objects, accessed by the dot to access the data.
The data returned by Python using Db.select can only be traversed once