Differences Between sorted() and sort() in Python
ฝัง
- เผยแพร่เมื่อ 23 ส.ค. 2023
- In this video we break down the nuances between the built-in function sorted() and the list method sort(), their benefits, and when you might choose one over the other 💡
Whether you're a beginner or just need a refresher, this will help you grasp the distinctions. Don't forget to subscribe for more weekly Python and developer tips & tricks 🐍
---
Learn more about Pybites / what we do: pybit.es
Get our weekly developer / mindset emails: pybit.es/friends/
Join our Slack community: pybit.es/community/
And last but not least, we appreciate any feedback to make our TH-cam content better 💡
form.jotform.com/230941798741062 🙏 - วิทยาศาสตร์และเทคโนโลยี
For more built-in functions, check out this video:
Useful Python Built-in Functions [Beginner / Intermediate]
th-cam.com/video/ejvql4eKev4/w-d-xo.html
very helpful thank you
thanks
could you plz explain more on the key and reverse part of sorted ...not available in sort i guess
Fortunately they are :)
Does this make sense?
>>> ll = ["9", 2, "5", 1]
>>> ll.sort()
Traceback (most recent call last):
File "", line 1, in
TypeError: '