Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8042733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:41:02+00:00 2026-06-05T04:41:02+00:00

In Python 2.7, how does Python’s built-in sorted function work – what algorithm does

  • 0

In Python 2.7, how does Python’s built-in sorted function work – what algorithm does it use?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T04:41:04+00:00Added an answer on June 5, 2026 at 4:41 am

    Older versions of Python (2.3 – 3.10) used an algorithm called Timsort:

    Timsort is a hybrid sorting algorithm, derived from merge sort and
    insertion sort, designed to perform well on many kinds of real-world
    data.
    It was invented by Tim Peters in 2002 for use in the Python
    programming language. The algorithm finds subsets of the data that are
    already ordered, and uses the subsets to sort the data more
    efficiently. This is done by merging an identified subset, called a
    run, with existing runs until certain criteria are fulfilled. Timsort was Python’s standard sorting algorithm from version 2.3 to version 3.10. It is
    now also used to sort arrays in Java SE 7, and on the Android
    platform.

    Since 3.11, Python uses Powersort, which was designed by Ian Munro and Sebastian Wild. It is an improved nearly-optimal mergesort that adapts to existing runs of sorted data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does python have a built-in function that converts a matrix into row echelon form
standard power operation ( ** ) in Python does not work for negative power!
r'\' in Python does not work as expected. Instead of returning a string with
Does Python have a built-in, simple way of encoding/decoding strings using a password? Something
Python does not provide built-in support for multi-dimensional arrays. I need to develop an
Python does not warrant the use of semicolons to end statements. So why is
Does Python have a function equivalent to scheme's apply? I notice that Python's reduce
next() in python does not work. What is an alternative to reading next line
This bit of Python does not work: def make_incrementer(start): def closure(): # I know
Python does not print traceback messages from exceptions raised in daemon threads. For example,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.