Logo

Programming-Idioms

History of Idiom 19 > diff from v27 to v28

Edit summary for version 28 by synapton:
New Python implementation by user [synapton]

Version 27

2016-11-29, 22:40:52

Version 28

2017-05-14, 03:47:52

Idiom #19 Reverse a list

Reverse the order of the elements of list x .
This may reverse "in-place" and destroy the original ordering.

Idiom #19 Reverse a list

Reverse the order of the elements of list x .
This may reverse "in-place" and destroy the original ordering.

Code
x = x[::-1]