Check if a key already exists in a dictionary
Saved by @bravocoder #python
Will be much faster as it uses the dictionary's hashing as opposed to doing a linear search, which calling keys would do.
https://stackoverflow.com/questions/1602934/check-if-a-given-key-already-exists-in-a-dictionary
Comments