We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I like Your solution. I made it somehow similiar to what you did. I add that I learn python 3rd day, so if someone see the problem in the code, all the comments are much appreciated.
def merge_the_tools(string, k):
for i in range (int(len(string)/k)):
s = string[i*k:(i+1)*k]
result = ''
for j in range (0 ,k):
if s[j] not in result:
result += s[j]
print (result)
Cookie support is required to access HackerRank
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 →
I like Your solution. I made it somehow similiar to what you did. I add that I learn python 3rd day, so if someone see the problem in the code, all the comments are much appreciated.
def merge_the_tools(string, k):