create all possible combinations python code example
Example 1: python get all combinations of list
itertools.combinations(iterable, r)
Example 2: python create a program that runs through all possible combinations
from itertools import combinations
lst = ["a" ,"b", "c"]
lengthOfStrings = 3
for i in combinations(lst, lengthOfStrings):
print(i)