Compress the String!

  • + 0 comments

    from itertools import groupby s=list(input()) for k,g in groupby(s): print(f"({len(list(g))}, {k})", end=" ")