SyntaxFix
Write A Post
Hire A Developer
Questions
You can use myDict.has_key(keyname) as well to validate if the key exists.
myDict.has_key(keyname)
This would work only on versions lower than 3.1. has_key has been removed from Python 3.1. You should use the in operator if you are using Python 3.1
has_key
in