Skip to content

Commit 5723f55

Browse files
committed
Add python solution to ORDER LIMIT challenge
1 parent 77a707a commit 5723f55

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/40-CRUD/3-ORDER-LIMIT.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,15 @@ This returns the **top 10 available books** in the "Science Fiction" genre.
8686
```
8787
</div>
8888
</TabItem>
89+
<TabItem value="python" label="Python">
90+
<div>
91+
```python
92+
books_sorted_by_title = books.find({}).sort("title", 1).limit(10)
93+
94+
for book in books_sorted_by_title:
95+
print(book)
96+
```
97+
</div>
98+
</TabItem>
8999
</Tabs>
90100
</details>

0 commit comments

Comments
 (0)