You are viewing a single comment's thread. Return to all comments →
print( *[ "".join( list( dict.fromkeys(string[i: i+k]) ) ) for i in range(0, len(string), k)], sep="\n")
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 →
another one liner solution (python 3.7+)