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.5.0.tar.gz
(23.4 kB
view details)
Built Distribution
File details
Details for the file dict_zip-0.5.0.tar.gz
.
File metadata
- Download URL: dict_zip-0.5.0.tar.gz
- Upload date:
- Size: 23.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47d9fc84e207692642d1e344da811fc6f991bb7eb1cc8ebcdb07ad290c58a7d1 |
|
MD5 | b5d1fa17ccd7a7cdbfa9066c7322e7a4 |
|
BLAKE2b-256 | aa025b1355641c1f54770374f74e777f3e58a2b93527b66c6c8b1c1ebec5f52d |
File details
Details for the file dict_zip-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: dict_zip-0.5.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 790c95d2fb4e53c8471e93bf8e6d99ca33b8191bfee0d7da8277c4c217bdf744 |
|
MD5 | 9f399404d69211cae9aefee7fd6e6cf8 |
|
BLAKE2b-256 | 8903bf357b1d97fdca4dbb18c7804be4a8b789e40d5d64b4fa509bda832cccbd |