例题2.11_2

例题2.11_2代码

import string, random, collections
x = string.ascii_letters + string.digits
y = ' '.join([random.choice(x) for i in range(1000)])
count = collections.Counter(y)
for k, v in sorted(count.items()):
    print(k, ':', v)







posted @ 2024-10-22 21:36  等我刷把宗师  阅读(10)  评论(0)    收藏  举报