for doc in collection.find().sort('field', pymongo.ASCENDING): print(doc). To sort by multiple fields, pass a list of (key, direction) pairs:
確定! 回上一頁