On Apr 24, 2007, at 12:28 PM, Robert Rawlins - Think Blue wrote:
Hello Guys,I’m Looking to build a quick if/else statement that checks a dictionary for a key like follows.If myDict contains ThisKey: Do this... Else Do that... Thats the best way of doing this?
if ThisKey in myDict: pass # do this else: pass # do that
-- http://mail.python.org/mailman/listinfo/python-list