Building on the answers of the others, a simple one liner, no side effect, not the fastest I guess:
>>> d={'a': 'bob', 'b': 'stu'} >>> set( d.keys() ).difference( [ 'a' ] ).pop() 'b' Note the square brackets for the parameter of difference(). 'The string 'a' and the list [ 'a' ] are both iterable but really are different. -- http://mail.python.org/mailman/listinfo/python-list