Comment exporter les données de MongoDB Python


import pymongo
 
client = pymongo.MongoClient("mongodb://localhost:27017/")
 
# Database Name
db = client["database"]
 
# Collection Name
col = db["YOUR_COLLECTION_NAME"]
 
#  Find All: It works like Select * query  of SQL. 
x = col.find()
 
for data in x:
    print(data)
Shanti