You are viewing a single comment's thread. Return to all comments →
My solution:-
from itertools import groupby S=input() print(*[(len(tuple(elements)), key) for key, elements in groupby(S, int)])
Seems like cookies are disabled on this browser, please enable them to open this website
Compress the String!
You are viewing a single comment's thread. Return to all comments →
My solution:-