Convert usingConverting to a list without keysusing the keys method to makes it more readable:
list(newdict) and, when looping through dictionaries there is, there's no need for keys():
for key in newdict: print key unless you are modifying it within the loop which would require a list of keys created beforehand:
for key in list(newdict): del newdict[key] On Python 2 there is a marginal performance gain using keys().