标签:append hello count pytho end print int class []
a = ‘hello world‘ b = [] for i in a: if ‘%s:%s‘ % (i, a.count(i)) not in b: b.append(‘%s:%s‘ % (i, a.count(i))) print(b)
标签:append hello count pytho end print int class []
原文地址:https://www.cnblogs.com/wf-skylark/p/9009663.html