I was looking for a printed version for MongoDB, and I understand how to do this from the shell. What I cannot find is how to do it with PyMongo, so when I run it in eclipse, the output will print quite, and not all on one line. Here is what I have right now:
cursor = collection.find({})
for document in cursor: print(document)
This prints everything in my collection, but every document in my collection just prints on one line. How can I change this to make it print pretty?
source
share