21ic电子技术开发论坛's Archiver
论坛首页
›
DIY讨论区
› test05.py
laojun001
发表于 2025-2-25 12:34
test05.py
import re
before = 'asdo356kasnhdf342wasdrqs123axda56755sdd'
after = re.sub(r'\d', '-', before)
print(after)
after2 = re.sub(r'A', '=', before, flags=re.IGNORECASE)
print(after2)
页:
[1]
查看完整版本:
test05.py