New course! Every coder should learn Generative AI!
Try a free lesson0
what is the difference between sort() and sorted() functions in python?
5 Answers
+ 4
The difference is,sort() is a function with no return value,it sorts the list and modifies the given list while sorted() function returns a new list with sorted elements of the given list
+ 2
https://realpython.com/JUMP_LINK__&&__python__&&__JUMP_LINK-sort/#ordering-values-with-sort
Explained very well here.
+ 1
Anjali Priya thank you so much ๐๐
0
Arnesh thanks
0
๐Welcome