Horje
combination python Code Example
combination python
# 1. Print all combinations 
from itertools import combinations

comb = combinations([1, 1, 3], 2)
print(list(combinations([1, 2, 3], 2)))
# Output: [(1, 2), (1, 3), (2, 3)]

# 2. Counting combinations
from math import comb
print(comb(10,3))
#Output: 120




Python

Related
how to make a hidden file in python Code Example how to make a hidden file in python Code Example
is prime python Code Example is prime python Code Example
python count null values in dataframe Code Example python count null values in dataframe Code Example
pandas drop empty columns Code Example pandas drop empty columns Code Example
drop if nan in column pandas Code Example drop if nan in column pandas Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7