the code is:-
import pymongo
cur=pymongo.MongoClient()
db=cur.test1
for site in db.sites.find():
print(site)
In the output, why the sequence is different everytime? It should be url first and then name as filled. ouput screenshot
the code is:-
import pymongo
cur=pymongo.MongoClient()
db=cur.test1
for site in db.sites.find():
print(site)
In the output, why the sequence is different everytime? It should be url first and then name as filled. ouput screenshot
There is no order in dictionaries , these are just key,value pairs so it is normal to have a different output everytime.