博客已经迁移:https://www.yemilice.com/ 文章不会再双更新,感谢多年陪伴,新博再见。
import
re
s0
=
'BOY and GIRL'
s1
re.sub(r
'BOY|GIRL'
,
'HUMAN'
, s0)
print
# HUMAN and HUMAN
替换方法。
Copyright @ 2024 Yemilice Powered by .NET 9.0 on Kubernetes Powered by: .Text and ASP.NET Theme by: .NET Monster