Mega Code Archive

 
Categories / Python Tutorial / List
 

The reverse method reverses the elements in the list

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