#把aaabbcccd这种形式的字符串压缩成a3b2c3d1这种形式。
b = {} c = "" a = 'aaabbcccd' for i in a: b[i] = b.get(i,0)+1 for i,t in b.items(): c+=str(i) c+= str(t) print(c)
下列表达是的值为True的是 A. 5+4j >2-3j B. 3>2>2 C. (3,2)<("a","b") D. " abc" > 'xyz'C