Answers for "check if list of keys in dictionary python"

1

python test if list of dicts has key

>>> lod = [{1: "a"}, {2: "b"}]
>>> any(1 in d for d in lod)
True
>>> any(3 in d for d in lod)
False
Posted by: Guest on December-19-2019
0

if we use list in the dictionary

if we use list in the dictionary
Posted by: Guest on October-21-2021

Code answers related to "check if list of keys in dictionary python"

Python Answers by Framework

Browse Popular Code Answers by Language