Merge the Tools!

  • + 0 comments
    def merge_the_tools(string, k):
        for substring in range(0, len(string), k):
            print(''.join(dict.fromkeys(string[substring : substring + k])))
    
    if __name__ == '__main__':
        string, k = input(), int(input())
        merge_the_tools(string, k)