int has a popcount method, but why should numbers have all the fun? This package adds a poopcount attribute on strings, which contains the (integer) amount of poop in the string.
Installation:
pip install poopcount
Usage:
>>> "hello world".poopcount
0
>>> "💩".poopcount
1
>>> "💩".join("012345").poopcount
5
>>> s = "holy 💩, this one's 💩really 💩💩crappy💩💩💩"
>>> (s * 100).poopcount
700
Release files for poopcount 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| poopcount-1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Release files / poopcount-1.0-py2.py3-none-any.whl
| Download URL | poopcount-1.0-py2.py3-none-any.whl |
|---|---|
| Size | 1.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a55427f733df78d8fa4796ef2695e1844e68b2c0ccbef91230a0e8544423148d
|
|
BLAKE2b-256 checksum How to use checksums |
1f7fb14361bd97e3f1a6cb59509da23753ab7c68e222c401b708992e8f540b22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|