[EMAIL PROTECTED] writes: > I have a dictionary of which i'm itervalues'ing through, and i'll be > performing some logic on a particular iteration when a condition is > met with trusty .startswith('foo'). I need to grab the previous > iteration if this condition is met. I can do something with an extra > var to hold every iteration while iterating, but this is hacky and not > elegant.
You cannot rely on the elements of a dictionary being in any particular order (dicts are internally hash tables), so the above is almost certainly ont what you want. -- http://mail.python.org/mailman/listinfo/python-list