Pymongo: Write Concern

Hi
When i ran the following in Jupyter, it worked as I could see the record in Atlas

But then when I copied those syntax over to my db.py and modified accordingly, I got an error when validating.

Previously I got all 4 tests passed but after adding the write concern, it caused an error which was due to the line related to the write concern.

Not sure why the syntax works in Jupyter but fails in db.py script.

Thanks

The most important part is at the bottom:

TabError: inconsistent use of tabs and spaces in indentation

With Python, it’s very important to be strict in using spaces and/or tabs to indent. Verify what the lines above and below have used and apply that to your lines.

Thanks, let me try to see if it works or not.