Open this example in the interactive library
Source code
keys, values = ('theme', 'size'), ('light', 16)
print(dict(zip(keys, values, strict=True)))Sample output
{'theme': 'light', 'size': 16}
Build a map from paired columns and reject missing values in Python.
Open this example in the interactive library
keys, values = ('theme', 'size'), ('light', 16)
print(dict(zip(keys, values, strict=True))){'theme': 'light', 'size': 16}