查找集合中的首个文档查找集合中的首个文档import pymongo myclient = pymongo.MongoClient("mongodb://localhost:27017/")mydb = myclient["mydatabase"]mycol = mydb["customers"] x mycol.find_one() print(x)