Skip to content

Commit 5301051

Browse files
committed
Add python solution to UPDATE challenge
1 parent 35ebdc2 commit 5301051

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/40-CRUD/5-UPDATE.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,16 @@ Executing the above command will insert a fresh new document in the collection,
106106
```
107107
</div>
108108
</TabItem>
109+
<TabItem value="python" label="Python">
110+
<div>
111+
```python
112+
reviews = db.collection("books")
113+
reviews.update_one(
114+
{"title": "Treasure of the Sun"},
115+
{"$set": {"pages": 449}}
116+
)
117+
```
118+
</div>
119+
</TabItem>
109120
</Tabs>
110121
</details>

0 commit comments

Comments
 (0)