Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In [23]: m = {'a' : 1, 'b' : 2}
- In [24]: 'a' in m and m['c'] == 3
- ---------------------------------------------------------------------------
- KeyError Traceback (most recent call last)
- <ipython-input-24-3db18402cae3> in <module>()
- ----> 1 'a' in m and m['c'] == 3
- KeyError: 'c'
Advertisement
Add Comment
Please, Sign In to add comment