If Dict Contains...

Robert Rawlins - Think Blue robert.rawlins at thinkbluemedia.co.uk
Tue Apr 24 12:40:33 EDT 2007


Hello Guys,

 

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?

 

Thanks,

 

Rob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070424/5ff55eaf/attachment.html>


More information about the Python-list mailing list