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?
You can
print tuple(reversed(foo_t)), or uselistin lieu oftuple, orand many variants. You could also use
foo_t[::-1], but I think thereversedbuiltin is more readable.