You are viewing a single comment's thread. Return to all comments →
Python solution
from itertools import combinations
def solve(s):
l=[] out=[] for i in range(1,len(s)+1): l+=list(combinations(s,i)) out=["".join(i) for i in l] return(sorted(out))
Seems like cookies are disabled on this browser, please enable them to open this website
Building a List
You are viewing a single comment's thread. Return to all comments →
Python solution
from itertools import combinations
def solve(s):