查找集合中的所有文档查找集合中的所有文档import pymongo myclient = pymongo.MongoClient("mongodb://localhost:27017/")mydb = myclient["mydatabase"]mycol = mydb["customers"] for x in mycol.find(): print(x)