Please apologize me if my question is naive, I am new to python and I am trying my hand on using the collections using pymongo. I have tried to extract the names using
collects = db.collection_names(); #This returns a list with names of collections
But when I tried to get the cursor using
cursor = db.collects[1].find(); #This returns a cursor which has no reference to a collection.
I understand that the above code uses a string instead of an object. So, I was wondering how I could accomplish this task of retaining a cursor for each collection in the DB, which I can use later to perform operations of search and update etc.