Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python dict in list of dict

>>> dict1
{'key2': 'value2', 'key1': 'value1'}
>>> my_list = [dict1, dict2]
>>> dict1 in my_list
True
>>> dict1 = {
... 'key1': 'something',
... 'key2': 'value2',
... }
>>> dict1 in my_list
False
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #dict #list #dict
ADD COMMENT
Topic
Name
2+7 =