Use dict.items() when iterating over a dict.