Python 操作 mongodb 找到记录中最后一条

 ret = mytable.find().sort([('_id', -1)]).limit(1)
print(ret[0])

你可能感兴趣的:(Python 操作 mongodb 找到记录中最后一条)