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

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -