[EMAIL PROTECTED] wrote: > Fredrik Lundh wrote: > > performance is of course another aspect; if you *need* two parallel > > lists, creating a list full of tuples just to pull them apart and throw > > them all away isn't exactly the most efficient way to do things. > > > > (if performance didn't matter at all, we could get rid most dictionary > > methods; "iterkeys", "in", and locking should be enough, right?)
> If I need two parallel list(one key, one value), I can still use the > same [(k,v)] tuple, just access it as x[0], x[1]. that's a single list containing tuples, not two parallel lists. this is two parallel lists: k = d.keys() v = d.values() assert isinstance(k, list) assert isinstance(v, list) use(k, v) </F> -- http://mail.python.org/mailman/listinfo/python-list