Merge the Tools!

  • + 0 comments
    1. import textwrap
      1. def merge_the_tools(string, k):
    2. if(len(string)%k==0):
    3. t_string = textwrap.wrap(string,k)
    4. u_string=[]
    5. for i in t_string:
    6. s=""
    7. for j in i:
    8. if(j not in s):
    9. s=s+j
    10. u_string.append(s)

      print("\n".join(u_string))