Reverse a list in python -


this question has answer here:

how reverse list in python? tried:

a = ["abc", "def", "ijk", "lmn", "opq", "rst", "xyz"] print a = reversed(a) print 

but <listreverseiterator object @ 0x7fe38c0c> when print a 2nd time.

use a[::-1]

its pythonic way of doing it.


Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -