Logo

Programming-Idioms

History of Idiom 41 > diff from v45 to v46

Edit summary for version 46 by Rochelimit:
New Python implementation by user [Rochelimit]

Version 45

2018-03-07, 03:20:06

Version 46

2019-09-26, 13:57:21

Idiom #41 Reverse a string

Create string t containing the same characters as string s, in reverse order.
Original string s must remain unaltered. Each character must be handled correctly regardless its number of bytes in memory.

Illustration

Idiom #41 Reverse a string

Create string t containing the same characters as string s, in reverse order.
Original string s must remain unaltered. Each character must be handled correctly regardless its number of bytes in memory.

Illustration
Code
t = s[::-1]