Python Programming 13. Sorting a List @ComputerScienceLessons
Python Programming 13. Sorting a List  @ComputerScienceLessons
Uploaded January 2022 | Updated November 2026, 3 hours ago
This is the 13th in a course of computer science video lessons introducing programming with Python. This lesson follows on from the previous two lessons which introduced Python lists and how to iterate through a list using a loop. In this lesson you will learn how to sort a Python list. You will learn that this is easily done with the so called sort method, which will replace the existing list with a new sorted version of the list. You will also learn how to use the so called sorted method to sort a list, which leaves the original list unchanged, and generates a new list which is a sorted version of the original list. You will also learn how to sort a list into reverse order using the reverse parameter of the sort method. This lesson mentions the underlying algorithm of the Python sort method, namely, the Timsort which was invented by a computer scientist called Tim Peters. The Timsort first analyses the list to decide how best to sort it. Then, depending on the amount of data and the extent to which the list is already sorted, it employs either an insertion sort algorithm or a combination of the insertion sort and the merge sort.
Python Programming 13. Sorting a ListVisual Basic.NET Programming. Beginner Lesson 8. Complex Arithmetic ExpressionsComputer ScienceC# Programming: Lesson 9.  Array VariablesVB.NET Programming. Intermediate Lesson 1. Event HandlingOperating System Functions 6: File ManagementPython Programming. Introducing the Python TurtleC# Programming: Lesson 10.  DebuggingIEEE 754 Standard for Floating Point Binary ArithmeticAdvanced VB.NET Programming – DelegatesBitwise Operators 2: The OR OperationInsertion Sort Algorithm
Computer Science Lessons |

Python Programming 13. Sorting a List

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER