Merge the Tools!

  • + 0 comments
    def merge_the_tools(string, k):
        import textwrap
        string = textwrap.wrap(string, k)
        for i in string:
            new_string = ""
            for a,b in enumerate(i):
                if b not in new_string:
                    new_string += b
            print(new_string)
    
    if __name__ == '__main__':
        string, k = input(), int(input())
        merge_the_tools(string, k)