Files
skills-lottery-picker/count_chars.py
T
2026-06-19 06:38:31 +00:00

7 lines
312 B
Python

import re, os
base = '/app/working/workspaces/default/novels/fqxs-wanmeibing'
for f in ['91','92','93','94','95','96','97','98','99','100','101','102','103','104','105']:
p = os.path.join(base, f)
t = open(p).read()
cn = len(re.findall(r'[\u4e00-\u9fff]', t))
print(f + ': ' + str(cn) + '汉字')