Monday, August 24, 2015

Reverse a list in python

Trick source


>>> L = [0,10,20,40]
>>> L[::-1]
[40, 20, 10, 0]

No comments: