📅  最后修改于: 2022-03-11 14:47:15.496000             🧑  作者: Mango
from itertools import groupby
List=input()
for c, items in groupby(List):
print(tuple([len(list(items)),int(c)]), end=' ')