About 724,000 results
Open links in new tab
  1. Python sorted() Function - W3Schools

    The sorted() function returns a sorted list of the specified iterable object. You can specify ascending or descending order. Strings are sorted alphabetically, and numbers are sorted …

  2. Sorting Techniques — Python 3.13.5 documentation

    2 days ago · Python lists have a built-in list.sort() method that modifies the list in-place. There is also a sorted() built-in function that builds a new sorted list from an iterable. In this document, …

  3. Python sorted() Function - GeeksforGeeks

    Mar 8, 2025 · sorted () function returns a new sorted list from the elements of any iterable like (e.g., list, tuples, strings ). It creates and returns a new sorted list and leaves the original …

  4. How to Use sorted() and .sort() in Python – Real Python

    Feb 24, 2025 · The sorted() function returns a new sorted list from the elements of any iterable, without modifying the original iterable. On the other hand, the .sort() method modifies a list in …

  5. sorted() builtin function - Python Examples

    Python sorted() built-in function sorts items of any iterable passed to it and returns sorted items in a list. In this tutorial, we will learn the syntax of sorted() function, how to use it to sort items in …

  6. SORTED | English meaning - Cambridge Dictionary

    SORTED definition: 1. used to describe a situation in which everything is correctly organized or repaired, or when…. Learn more.

  7. sorted() in Python - Built-In Functions with Examples - Dive Into …

    The sorted() function in Python is a built-in function used to sort iterables such as lists, tuples, and strings. It returns a new sorted list without modifying the original one. You can also pass in …

  8. Python - How to Sort List with sort() and sorted() - Stack Abuse

    May 23, 2023 · In this short guide, learn how to sort a list in Python using the built-in sort() and sorted() functions. sort() is a method of the list class, and sorts the list in-place, returning …

  9. Python sorted() - Programiz

    The sorted() method sorts the elements of the given iterable in ascending order and returns it. In this tutorial, we will learn about the Python sorted() function with the help of examples.

  10. Python Sort List – In-Depth Guide to sort() and sorted()

    Dec 22, 2024 · How to use sorted() to create a new sorted list copy; Sort stability and efficiency tradeoffs; Key functions and reverse sorting; Sorting more complex data like tuples and …