diff options
author | 2023-03-25 19:14:18 -0600 | |
---|---|---|
committer | 2023-03-25 19:14:18 -0600 | |
commit | cb48b72b26edf21554fb34564da93ddc99032c2a (patch) | |
tree | 48e279160ee10f610e8d4280b8997824d740d17d | |
parent | Comply to PEP8 (diff) |
Update required wording
-rw-r--r-- | bot/resources/tags/in-place.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/resources/tags/in-place.md b/bot/resources/tags/in-place.md index 0fd672cf0..0fb11de8b 100644 --- a/bot/resources/tags/in-place.md +++ b/bot/resources/tags/in-place.md @@ -19,4 +19,4 @@ sorted(list_to_sort) print(list_to_sort) # The list still isn't sorted. Why? ``` -To avoid these errors and unexpected results, it is required to assign the result of `sorted(...)` to a new variable and use `list.sort()` method in the original list. This way, the original list will be sorted and the new list will be created with the sorted elements. +To avoid these errors and unexpected results, you should either use an out-of-place operation `(sorted(...))` and assign it to a variable or use an in-place operation `(list.sort())` without assignment. |