Merge the Tools!. Consider the following: | by Isabelle | JEN-LI CHEN IN DATA SCIENCE | Medium

PHOTO EMBED

Thu Jul 25 2024 15:51:36 GMT+0000 (Coordinated Universal Time)

Saved by @vishwanath_m

def merge_the_tools(string, k):
    while string: # while string is not None
        seen = ''
        s = string[0:k]
        for c in s:
            if c not in seen:
                seen += c
        print(seen)
        string = string[k:]
        
if __name__ == '__main__':
    string, k = input(), int(input())
    merge_the_tools(string, k)
content_copyCOPY

https://medium.com/jen-li-chen-in-data-science/merge-the-tools-4ec999c75bc9