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.3.0.tar.gz
(21.4 kB
view details)
Built Distribution
File details
Details for the file dict_zip-0.3.0.tar.gz
.
File metadata
- Download URL: dict_zip-0.3.0.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 955204e339702ef87c52c8303baf5ce062756adece64f901a6ca7a9fcfe8c43f |
|
MD5 | cfeabf7856e67fb2fa4523acefaeae04 |
|
BLAKE2b-256 | 605b3f50d48c2e2ce2353a443d3286844a5f445a3d0ecd59ad9d18f1d502e3ef |
File details
Details for the file dict_zip-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: dict_zip-0.3.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b6082e6661e5784137a8690a325daf06f1e1732cc53a013257e70b3c7e30504 |
|
MD5 | 748cbedccb6787a2f19141c9ebbb543d |
|
BLAKE2b-256 | faa56db85a64af6080de6a7975e44b40b488a7e0edb6238030e9c7e000cd42b9 |