I know there exists the sort() function.
What I want to know is how it was built.
Is there a function in python to call the contents of a function
Or can someone show me how that one was made.
I'm doing a test, and it wants me to sort a list (a=[5,2,3,1,4] but not use any sort function(aka build your own)
Thanks
-Brandon
Edit: when I type sort or help(sort) or sort(), the interpreter can't find the function. Do I need to include it in some way, or download a pack?

There is a code snippet that vegaseat left at:
http://www.daniweb.com/code/snippet452.html

He talks a little bit about the history of Python's sort() algorithm and calls it an adaptive mergesort algorithm. Very highly optimized, very fast and very stable, it is part of the interpreter core written in C. You would have to get the readily available C source code and look for it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.