Open in app
Home
Notifications
Lists
Stories

Write
Ramya Bhaskar
Ramya Bhaskar

Home

May 14, 2021

Difference between list.sort() and sorted() in Python?

There are 2 way to sort the elements in the list, the built-in list method list.sort() and the built-in function sorted(). Although both will sort the elements of a list, there is a huge difference in the way they work. Differences and similarities: The primary difference between the two is…

Python

2 min read

Difference between list.sort() and sorted() in Python?
Difference between list.sort() and sorted() in Python?
Ramya Bhaskar

Ramya Bhaskar

Founder of Givemefive.ai . Online Artificial Intelligence , Programming and Space Science for 7–18 years old

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable