Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e82e71

Browse files
committed
Changed the extended slice example to show that you can reverse a
string with a [::-1] slice.
1 parent e9996c6 commit 2e82e71

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Misc/NEWS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Core and builtins
1010
finally clause. [SF bug 567538]
1111

1212
- Most builtin sequences now support "extended slices", i.e. slices
13-
with a third "stride" parameter. For example, "range(10)[1:6:2]"
14-
evaluates to [1, 3, 5].
13+
with a third "stride" parameter. For example, "hello world"[::-1]
14+
gives "dlrow olleh".
1515

1616
- Cycles going through the __class__ link of a new-style instance are
1717
now detected by the garbage collector.

0 commit comments

Comments
 (0)