list(dict) works in both Python 2 and Python 3, providing a simple list of the keys in dict. keys() isn't necessary. (: ... for key in list(newdict): del newdict[key] On Python 2 there is a marginal performance gain using keys(). share | improve this