What happens to a pymongo cursor when all its elements have been iterated?
问题 I wanted to use pymongo to get an array of entries from my database. It seems to return a "cursor" instead. I don't know what that is. all_nodes = pymongo.MongoClient("mongodb://localhost")["provemath"]["nodes"].find(None) print('ALL NODES') for node in all_nodes: print(node) print('STILL NODES') for node in all_nodes: print(node) There output is: ALL NODES {'_notes': [], '_examples': [], '_type': 'definition', '_plural': None, '_counterexamples': [], '_intuitions': [], '_id': 'unique', '