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
+17-5Lines changed: 17 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()`][sort].
140
+
Default sort order is _ascending_ from the left.
141
+
The Python docs offer [additional tips and techniques for sorting][sorting how to].
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/cater-waiter/.docs/instructions.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ You and your business partners operate a small catering company. You've just agr
4
4
5
5
## 1. Clean up Dish Ingredients
6
6
7
-
The event recipes were added from various sources and their ingredients appear to have duplicate (_or more_) entries -- you don't want to end up purchasing excess items!
7
+
The event recipes were added from various sources and their ingredients appear to have duplicate (_or more_) entries — you don't want to end up purchasing excess items!
8
8
Before the shopping and cooking can commence, each dish's ingredient list needs to be "cleaned".
9
9
10
10
Implement the `clean_ingredients(<dish_name>, <dish_ingredients>)` function that takes the name of a dish and a `list` of ingredients.
@@ -138,5 +138,5 @@ from sets_categories_data import example_dishes, EXAMPLE_INTERSECTION
0 commit comments