All Questions
5 questions
2
votes
2
answers
181
views
Permute string by indices
Find all distinct permutations of a string where only certain indices are allowed to be permuted.
e.g string_perms('test_world', [2,3]) --> ['test_world', 'tets_world']
I have an answer but it ...
0
votes
2
answers
2k
views
Want to make a list of all 4 character combinations of 'abcdefghijklmnopqrstuvwxyz0123456789'
i want to make a list of all possible combinations of the letters of the alphabet and all numbers, so starting at
aaaa aaab aaac aaad aaae
all the way up to
z999 zzz9 0009
and everything in between
I'...
1
vote
1
answer
801
views
Create all possible variations of string Python
I met a problem, I need to create a list of all possible variations of string. I had already tried some methods from itertools, like [''.join(i) for i in itertools.permutations('abc')] or
(comb = [''....
3
votes
4
answers
775
views
How to find all possible permutation of two strings within constant length
I want to find all possible permutation of two list of strings within a constant length (5). Assume list_1 = ["A"] and list_2 = ["BB"].
All possible combinations are:
A A A A A
A ...
5
votes
2
answers
3k
views
How to turn the result (in python) of itertools.permutations("0123456789") into list of strings
In Python, I am using list(itertools.permutations("0123456789")), and I am receiving (I as expected) a list of tuples of singled character strings.
Is there a way to turn that result into a list of ...