You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: concepts/list-methods/about.md
+18-5Lines changed: 18 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,10 +136,22 @@ The order of list elements can be reversed _**in place**_ with `<list>.reverse(
136
136
[3, 2, 1]
137
137
```
138
138
139
-
List elements can be sorted _**in place**_ using `<list>.sort()`.
140
-
Internally, Python uses [`Timsort`][timsort] to arrange the elements.
141
-
The default order is _ascending_.
142
-
The Python docs have [additional tips and techniques for sorting][sorting how to]`lists` effectively.
139
+
A list can be re-ordered _**in place**_ with the help of `<list>.sort()`.
140
+
Default sort order is _ascending_ from the left.
141
+
The Python docs offer [additional tips and techniques for sorting][sorting how to] lists effectively.
142
+
143
+
144
+
~~~~exercism/note
145
+
From 2002 to 2022, Python used an algorithm called [`Timsort`][timsort] internally to arrange lists, but switched to [`Powersort`][powersort] from `Python 3.11` onward.
146
+
You can read more details and discussion on the change from the core Python team in the GitHub [issue 78742][78742].
147
+
148
+
For technical details on the algorithm, see the J. Ian Munro and Sebastian Wild paper [Nearly-Optimal Mergesorts: Fast, Practical Sorting Methods That Optimally Adapt to Existing Runs][nearly-optimal-mergesorts]
Copy file name to clipboardExpand all lines: exercises/concept/chaitanas-colossal-coaster/.docs/introduction.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,9 +151,15 @@ The `<list>.reverse()` method will reverse the order of elements **in-place**.
151
151
152
152
153
153
A list can be re-ordered _**in place**_ with the help of `<list>.sort()`.
154
-
Internally, Python uses [`Timsort`][timsort] to arrange the list.
155
-
Default order is _ascending_ from the left.
156
-
The Python docs offer [additional tips and techniques for sorting][sorting how to] lists effectively.
154
+
Default sort order is _ascending_ from the left.
155
+
The Python docs offer [additional tips and techniques for sorting][sorting how to] lists effectively.
156
+
157
+
~~~~exercism/note
158
+
From 2002 to 2022, Python used an algorithm called [`Timsort`][timsort] internally to arrange lists, but switched to [`Powersort`][powersort] from `Python 3.11` onward.
0 commit comments