记录菜鸟教程中不包含的部分操作: 获得collection中documents总数 mycol.count_documents({}) 用python操作MongoDB查询collection中最新的一个document mycol.find_one(sort=[(’_id’, -1)]) pymongo的比较排序查询性能比较,sort参数和sort函数, find和find_one