pymongo query returns value or not -
result = db.nps.find({"customer_name": account}, { "_id": 0 })
i want check if result empty or not without iterating results
for e.g:
if result:
any appreciated
use find_one instead. find_one returns none if there no result.
Comments
Post a Comment