Snippets tagged “dicts”
1 snippet uses this tag.
- Should I use 'has_key()' or 'in' on Python dicts?Python
It is recommended to use the in keyword to check if a key exists in a Python dict, rather than the has_key() method.
1 snippet uses this tag.
It is recommended to use the in keyword to check if a key exists in a Python dict, rather than the has_key() method.