What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-14 02:41:03
find all unique substring permutations of a string of a specific length python
import itertools x = "some string" # aList contains all permutations of all lengths of string x aList = [each for eachpermut in [''.join(l) for i in range(len(x)) for l in itertools.combinations(x, i+1)] for each in [''.join(eachpermut) for ea... Add solution