V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  kaitolucifer  ›  全部回复第 1 页 / 共 1 页
回复总数  1
2020-10-22 19:29:10 +08:00
回复了 JCZ2MkKb5S8ZX9pq 创建的主题 Python Python 多个列表相加怎么写
The issue of quadratic performance of sum(sequences, null_seq) is known, which is why the doc says that sum() is for numbers and recommends .join for strings and itertools.chain for other sequences.

上面那个 sum trick 貌似很慢?
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2256 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 08:25 · PVG 16:25 · LAX 01:25 · JFK 04:25
Developed with CodeLauncher
♥ Do have faith in what you're doing.