No project description provided
Project description
pymutation
Python library for calculating permutations and combinations
Example:
from pymutation import pymutation
# A reading list contains 11 novels and 5 mysteries.
books = ['N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'M', 'M', 'M', 'M', 'M']
# In how many different ways could a student select
# a. a novel or a mystery?
print(pymutation(books, [lambda x: x == 'N' or x == 'M'])) # 16
# b. a novel and then a mystery?
print(pymutation(books, ['N', 'M'])) # 55
# c. a mystery and then another mystery?
print(pymutation(books, ['M', 'M'])) # 20
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
pymutation-0.1.0.tar.gz
(1.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymutation-0.1.0.tar.gz.
File metadata
- Download URL: pymutation-0.1.0.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d30c7d0541cf9dfd5ded23204f2515651d69dee54e7cc454c6b4266f1e256979
|
|
| MD5 |
a1ab6cc28593c75e1381798bdff12aef
|
|
| BLAKE2b-256 |
0374b3bd54227be45845eaf1cf4d45080ae1d310cf99a56c5d77d7db6077a089
|
File details
Details for the file pymutation-0.1.0-py2-none-any.whl.
File metadata
- Download URL: pymutation-0.1.0-py2-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22e94680eac6fbd14b1df28edac3f4a1315e460cb8384a2dbc7d7e8c84455439
|
|
| MD5 |
80235af6f499f21aa60d953985ff50a5
|
|
| BLAKE2b-256 |
5a2ff03dae95a7f248be72a2f18a2e13fe27aa24125c02ff9f7d20d35b31a82c
|