Python Challenge 第 2 关攻略:ocr

mac2022-06-30  22

text="那一大推乱码" 方案1

from collections import Counter print(Counter(text))

方案2

import string >>> filter(lambda x: x in string.letters, text) 'equality'

转载于:https://www.cnblogs.com/c-x-a/p/9705833.html

最新回复(0)