I am running a python script to retrieve data from a mongo collection. I would like to use the "$nin" operator to retrieve all the fields from the collection except for the ones whose "UserID" is not like "xyz.com". Below is my script, I am running into a syntax error using the script. Could you please let me know how the "$nin" should be represented in pymongo ?
for data in db.userauthorization.find({'UserID':{"$nin":{[/'xyz.com'/]}}}):
print data
Thanks in advance!