MongoDB:未知运算符$and

MongoDB:未知运算符$and,mongodb,pymongo,operator-keyword,Mongodb,Pymongo,Operator Keyword,我和pymongo一起工作。 我想为字段状态不同于0和1的所有元组返回字段_id 以下查询返回错误: pymongo.errors.OperationFailure: unknown operator: $and 更多帮助: pymongo.errors.OperationFailure: unknown operator: $and mytable.find( {'$and': [{'status': {'$ne': 0 }}, {'status': {

我和pymongo一起工作。 我想为字段状态不同于0和1的所有元组返回字段_id

以下查询返回错误:

pymongo.errors.OperationFailure: unknown operator: $and
更多帮助:

pymongo.errors.OperationFailure: unknown operator: $and
mytable.find(
  {'$and':
       [{'status':  {'$ne': 0 }},
        {'status': {'$ne': 1 }}]
  })