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

Popular posts from this blog

resizing Telegram inline keyboard -

javascript - How to bind ViewModel Store to View? -

javascript - Solution fails to pass one test with large inputs? -