On Tuesday 04 November 2003 10:57 pm, Delaney, Timothy C (Timothy) wrote: > > From: Alex Martelli [mailto:aleaxit at yahoo.com] > > > > or reversed(enumerate(seq)) if the index IS needed. > > Hmm - wouldn't this give an iterator that returned two values - an iterable > for the seq, and an iterable for the indexes of seq? I must be missing something. enumerate(x) is an iterator with len(x) values, each a pair; why would reversing it somehow "transpose" it...? > I would think this would need to be: > > reversed(*enumerate(seq)) > > with the presumption being that reversed would reverse each parameter and > return them in lockstep. I'm not sure if reversed should take several parameters, but it if did this would be like calling: reversed( (0, x[0]), (1,x[1]), (2,x[2]) ) If it "reversed each parameter and returned them in lockstep" then I'd have x first and (0,1,2) second, no? Alex
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4