You are viewing a single comment's thread. Return to all comments →
from itertools import groupby if __name__ == "__main__": data = input() result=[] for key, group in groupby(data): s=[] s.append(len(list(group))) s.append(int(key)) print(tuple(s),end=" ")
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 →