# 265字符,不遵循PEP8规范250字符以下 def g(s): d = "" while len(s) > 0: d += s[0] w = s[1:] n = 1 for j in w: if j == s[0]: n += 1 else: break d += str(n) s = s[n:] return d