SyntaxFix
Write A Post
Hire A Developer
Questions
You can also try to use get(), for example:
get()
connection = manager.connect.get("I2Cx")
which won't raise a KeyError in case the key doesn't exist.
KeyError
You may also use second argument to specify the default value, if the key is not present.