efficiently list items in tuples starting at end
Posted
by Donnied
on Stack Overflow
See other posts from Stack Overflow
or by Donnied
Published on 2010-04-17T18:49:45Z
Indexed on
2010/04/17
18:53 UTC
Read the original article
Hit count: 186
I'd like to list the items in a tuple in Python starting with the back and go to front. Similar to:
foo_t = tuple(int(f) for f in foo)
print foo, foo_t[len(foo_t)-1] ...
I believe this should be possible without Try ...-4, except ...-3. Thoughts? suggestions?
© Stack Overflow or respective owner