HACKER
TALK
Home
Bookmarks
Messages
Notifications
Sign In
Comment
如何优化多个重复的pyhon replace
总共有大概1万个replace替换,如何简化这个代码 我尝试了用for循环遍历数组的方式,但那会非常卡,效率比这个还慢
HD Superman
·
a year ago
Across the Great Wall, we can reach every corner in the world.
比较懒的做法:放在多个线程里面跑,线程可以按文本分割或者安 replace 任务分割
Reply
Report
Replies
1
LingLing1301
·
a year ago
但是这个replace必须按顺序替换,不然替换出来的文本就是错误的。。。还有其他办法吗QAQ
Reply
Report
HD Superman
Joined 3 years ago
Across the Great Wall, we can reach every corner in the world.
https://github.com/hdsuperman
Follow
Message
Latest posts
app无法登录,抓包数据。网页版可以登录,求分析求解
分享免费云服务器
急切寻求rust编译问题帮助(archlinux, openssl)
分享免费GPT4站点
【轉貼】ASP.NET Core Developer Roadmap in 2024
南京大学研究中心诚募博士后
求助can't establish SSL connection.