Possible combinations - Python Library
Project description
A simple library that calculates all possible combinations of a list of a given length.
Example(hex to binnary)
import pcomp
print (pcomp.area(range(2),4)
#it returns: 16
print (pcomp.pc(range(2),4)
#it returns: [[0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0], [0, 0, 1, 1], [0, 1, 0, 0], [0, 1, 0, 1], [0, 1, 1, 0], [0, 1, 1, 1], [1, 0, 0, 0], [1, 0, 0, 1], [1, 0, 1, 0], [1, 0, 1, 1], [1, 1, 0, 0], [1, 1, 0, 1], [1, 1, 1, 0], [1, 1, 1, 1]]
#[0]=0,[1]=1 …. [15]=f
Change Log
1.1.0 (19/8/2022)
New return form
The all function has been renamed to pc
Better file organization and function syntax
1.0.2 (10/7/2022)
Added github
1.0.2 (10/7/2022)
Added github
1.0.1 (10/7/2022)
Fixed a problem
1.0.0 (10/7/2022)
First Release
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.