Count dictionary package in python.
Project description
count_dict
This is a Python package for count dictionaries.
Welcome to complete the documentation.
Installation
Installation can be done through pip. You must have python version >= 3.6.
pip install count-dict
Usage
The statement to import the package:
from count_dict_package import count_dict
or
from count_dict_package import *
Example:
>>> accumulated = count_dict()
>>> accumulated['x'] += 9
>>> accumulated.items()
dict_items([('x', 9)])
>>> accumulated = count_dict(10)
>>> accumulated['x'] += 9
>>> accumulated.items()
dict_items([('x', 19)])
>>> accumulated = defaultdict(count_dict)
>>> accumulated['x']['y'] += 9
>>> {'x': dict(accumulated['x'])}
{'x': {'y': 9}}
>>> accumulated = defaultdict(count_dict(10))
>>> accumulated['x']['y'] += 9
>>> {'x': dict(accumulated['x'])}
{'x': {'y': 19}}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
count_dict-1.0.1.tar.gz
(2.8 kB
view hashes)
Built Distribution
count_dict-1.0.1-py3-none-any.whl
(15.6 kB
view hashes)
Close
Hashes for count_dict-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dcfad4553e87302b11a9953e1be29dad37bbed379a3f3e6950d59c0f04f1a46 |
|
MD5 | 1e1593acfc7197851d4a436e30b9b87f |
|
BLAKE2b-256 | 23a334702eb3c9e82ecbabe305908460b32c8804ad90497252db66aa497409e9 |