Skip to main content

zip and zip_longest for dict

Project description


zip and zip_longest for dict.





dict_zip is zip for dict.

>>> from dict_zip import dict_zip
>>> dict_zip({'a': 1, 'b': 2}, {'a': 3, 'b': 4})
{'b': (2, 4), 'a': (1, 3)}


dict_zip_longest is zip_longest for dict. It fills with fillvalue (default: None) when argument dict doesn't have match key.

>>> from dict_zip import dict_zip_longest
>>> dict_zip_longest({'a': 1, 'b': 2, 'c': 4}, {'a': 3, 'b': 4})
{'b': (2, 4), 'a': (1, 3), 'c': (4, None)}


The 3-Clause BSD License. See also LICENSE file.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dict-zip, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size dict_zip-0.1.0-py2-none-any.whl (3.0 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size dict_zip-0.1.0.tar.gz (1.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page