You are viewing a single comment's thread. Return to all comments →
def merge_the_tools(string: str, k: int): length: int = len(string) for i in range(0, length, k): result: list[str] = [] for char in string[i : i + k]: if char not in result: result.append(char) print("".join(result)) if __name__ == "__main__": string, k = input(), int(input()) merge_the_tools(string, k)
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 →