SyntaxFix
Write A Post
Hire A Developer
Questions
Use .get(), which if the key is not found, returns None.
.get()
None
for i in keySet: temp = myDict.get(i) if temp is not None: print temp break