Skip to main content

A package that generates all possible combinations in a given set as a list

Project description

The package

combs is a package used to generate all possible combinations of a given length k on a given set. The set is given as a list, and k must be equal to 0 or positive.

Usage examples

With integers

from combs import combinations

l = [89,32,6,7]
k = 2
combs = combinations.find_combinations(l, k)
print(combs)

Output :

[[89, 32], [89, 6], [89, 7], [32, 6], [32, 7], [6, 7]]

With strings

from combs import combinations

l = ["github", "gitlab", "azuredevops", "svn"]
k = 3
combs = combinations.find_combinations(l, k)
print(combs)

Output :

[['github', 'gitlab', 'azuredevops'], ['github', 'gitlab', 'svn'], ['github', 'azuredevops', 'svn'], ['gitlab', 'azuredevops', 'svn']]

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

PyCombs-1.0.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PyCombs-1.0.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file PyCombs-1.0.0.tar.gz.

File metadata

  • Download URL: PyCombs-1.0.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9

File hashes

Hashes for PyCombs-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b32f2bc1d177f1610d8c97547b06a0271f18fa4d7444db96298f71fc0d72d83c
MD5 c7e43598c4ec93cd61afb672f91d6fd1
BLAKE2b-256 383dab20bc48977d0bfdb08c96f783bad854d677316a96aeff07f509872cee02

See more details on using hashes here.

File details

Details for the file PyCombs-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: PyCombs-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9

File hashes

Hashes for PyCombs-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f57e4fac88187e918353c0e74d8952126338abc25ab1e0e7dd6f70789fc5f1c2
MD5 43dae3b296d2c7605940b42cafdd2ab9
BLAKE2b-256 280db1343e78b22085f153dea15e99d4394672394141b9b52bea3eaea2948f95

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page