You are viewing a single comment's thread. Return to all comments →
def merge_the_tools(string, k): # your code goes here stlist = [] c = 1
for char in string: if char not in stlist: stlist.append(char) if c == k: output = "".join(stlist) print(output) stlist.clear() c = 1 continue c +=1
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 →
def merge_the_tools(string, k): # your code goes here stlist = [] c = 1
if name == 'main': string, k = input(), int(input()) merge_the_tools(string, k)