☄️Heya Mates☄️
TOPIC : List in Python.
QUES:Find difference between sort and sorted.
Answers
Answered by
0
Answer:
sorted will be modified the list it is called on and sort prepares it's own list
Answered by
2
Answer:
sort basically works with the list itself. It modifies the original list in place. The return value is None.
sorted works on any iterable that may include list, dictionary and so on. It returns another list and doesn't modify the original list.
Similar questions
Physics,
3 months ago
English,
3 months ago
Hindi,
7 months ago
Geography,
11 months ago
Accountancy,
11 months ago