Random


#1

Hi, does anyone know how to make a python program that outputs all the possible combinations of a string.
For Example: input: ABC
output: abc, bca, cab, acb, bac, ...


#2

To find all the permutations use itertools.permutations, example -> https://repl.it/CsKt


#3

I tried your code out and what came out was:
TypeError: 'builtin_function_or_method' object is not subscriptable


#4

Well, this code works and you can check this here -> https://repl.it/CsKt

So please provide some information. Have you modified the code? Which version of Python do you use? Where did you test it? Screenshot also might be helpful.


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.