You are viewing a single comment's thread. Return to all comments →
Looks pretty clean to me (Python 3)
from itertools import groupby print(*[(len(list(c)), int(k)) for k, c in groupby(input())])
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 →
Looks pretty clean to me (Python 3)