/* */

Tuesday, 22 March 2011

Reverse

reverse elements in a list;

x = [1,2,3]
x.reverse()
x
[3,2,1]

This reverses the list but doesn't return anything.

No comments:

Post a Comment