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.
- Prepare
- Python
- Strings
- Merge the Tools!
- Discussions
Merge the Tools!
Merge the Tools!
Sort by
recency
|
2622 Discussions
|
Please Login in order to post a comment
def merge_the_tools(string, k): # your code goes here l1 = list(string) length = len(l1) tmp = [] for i in range(int(length/k)): tmp.append(l1[0:k]) l1 = l1[k:] out = list(map(set,tmp)) for i in out: print("".join(i))
if name == 'main': string, k = input(), int(input()) merge_the_tools(string, k)
`python
`
Add CommentPermalink