You are viewing a single comment's thread. Return to all comments →
from itertools import permutations string=str(input()) perms = [''.join(p) for p in permutations(string)] for i in range(len(perms)): perms[i]=perms[i][:2] perms= list(set(perms)) print(len(perms))
Anyone knows why its giving me runtime errors ? I tried it on my own pc and it was working just fine!
Seems like cookies are disabled on this browser, please enable them to open this website
Beautiful Strings
You are viewing a single comment's thread. Return to all comments →
Anyone knows why its giving me runtime errors ? I tried it on my own pc and it was working just fine!