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 -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -