Ethan Furman wrote:
Ian Kelly wrote:next(iter(myDict.items()))Which is becoming less elegant.
If you're doing this sort of thing a lot you can make a little helper function: def first(x): return next(iter(x)) then you get to say first(myDict.items()) -- Greg -- http://mail.python.org/mailman/listinfo/python-list