Merge the Tools!

  • + 0 comments

    import textwrap def merge_the_tools(string, k): wrapper = textwrap.TextWrapper(width=k) h = wrapper.wrap(string) for s in h: s = list(s) for i in s: while s.count(i) > 1: s.reverse() s.remove(i) s.reverse() print(''.join(s))