Merge the Tools!

  • + 0 comments

    Another method which works as well!

    Python 3, all test cases passed:

    from collections import Counter
    def merge_the_tools(string, k):
        for s in [string[i:i+k] for i in range(0, len(string), k)]:
            print("".join(Counter(s)))