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.
for i in range(0, len(string), k):
s = ''
s += string[i]
g=0
for j in range(i + 1, i + k):
c = False
g += 1
for h in range(g):
if string[j:j + 1] != string[i + h]:
c = True
else:
c = False
break
if c:
s += string[j:j + 1]
print(s)
Merge the Tools!
You are viewing a single comment's thread. Return to all comments →
l = len(string) // k print(l)