zip and zip_longest for dict
Project description
dict_zip
zip and zip_longest for dict.
Installation
$ pip install dict-zip
Usage
dict_zip
dict_zip
is zip
for dict.
>>> from dict_zip import dict_zip
>>> dict_zip({'a': 1, 'b': 2}, {'a': 3, 'b': 4})
{'a': (1, 3), 'b': (2, 4)}
dict_zip_longest
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})
{'a': (1, 3), 'b': (2, 4), 'c': (4, None)}
Type hints
dict_zip supports for type hints.
LICENSE
The 3-Clause BSD License. See also LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dict_zip-0.2.4.tar.gz
(17.5 kB
view details)
Built Distribution
File details
Details for the file dict_zip-0.2.4.tar.gz
.
File metadata
- Download URL: dict_zip-0.2.4.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d3476f384899ec35d2726c013b899118935757b17f3693f6d7f3cdc9e85ffd0 |
|
MD5 | e4b5e0af8c71cbeeabdef30094c7f62a |
|
BLAKE2b-256 | 5a4fc43085ae531979063d832edf7c61a941ab03d6f4beda1789b993a2a194e3 |
File details
Details for the file dict_zip-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: dict_zip-0.2.4-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79e9ab3edadf52bf917ef3cb75793a2a4a47d183770b2f2d9acc890d39b04d76 |
|
MD5 | 8f14faf00784ce6be14bc60cb4412038 |
|
BLAKE2b-256 | e3253c4b8395399d93a208e3d46d2c2f98d0323a23d89ee0a41b978cbafb9313 |