Skip to main content

All 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 ...
Andy's user avatar
  • 21
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'...
saadia's user avatar
  • 9
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 = [''....
Faser's user avatar
  • 23
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 ...
user avatar
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 ...
Matthew Denaburg's user avatar