You are viewing a single comment's thread. Return to all comments →
Here is my solution, a single pass using modulo to have flags cutting the string:
def merge_the_tools(string, k): sb = '' for idx, s in enumerate(string, start=1): if s not in sb: sb = sb + s if idx % k == 0: print(sb) sb = ''
Seems like cookies are disabled on this browser, please enable them to open this website
Merge the Tools!
You are viewing a single comment's thread. Return to all comments →
Here is my solution, a single pass using modulo to have flags cutting the string: