The Python Oracle

What is the difference between `sorted(list)` vs `list.sort()`?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Track title: CC H Dvoks String Quartet No 12 Ame

--

Chapters
00:00 Question
00:57 Accepted answer (Score 423)
02:08 Answer 2 (Score 63)
06:09 Answer 3 (Score 16)
06:52 Answer 4 (Score 5)
07:39 Thank you

--

Full question
https://stackoverflow.com/questions/2244...

Question links:
[Why do these list operations (methods) return None, rather than the resulting list?]: https://stackoverflow.com/questions/1120...

Answer 1 links:
[an older list creation expense myth]: https://stackoverflow.com/questions/1436...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #list #sorting #copy #inplace

#avk47