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)}
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.1.tar.gz
(16.3 kB
view details)
Built Distribution
File details
Details for the file dict_zip-0.2.1.tar.gz
.
File metadata
- Download URL: dict_zip-0.2.1.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f177b0f788f200132b383fb31531e8d637c023443b9c84fe936fb1f90eb1628 |
|
MD5 | 33836c7b44d507c8648379eb6e310fa3 |
|
BLAKE2b-256 | 33134a36fb5e835ffa94f745471870128ad113fa4027f391f77be0b0dfce69e1 |
File details
Details for the file dict_zip-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: dict_zip-0.2.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 091ffa7a426ff087dad4e9df0ba4bd336fe2fa1643beffe4f546181f745a435e |
|
MD5 | e093567232d6f49ef830ae9e494efc5e |
|
BLAKE2b-256 | b57b56f383b93633a703a0d6edcf6a600149551a0bc928487fb45a771cd165e2 |