def lst_substrings(s,ans): if len(s) == 0: print(ans) ch=s[0] ros=s[1:] lst_substrings(ros,ans) lst_substrings(ros,ans+ch) s="