gpt4 book ai didi

python - 在列表上使用求和函数时,“int”对象不可调用

转载 作者:太空狗 更新时间:2023-10-29 17:35:30 25 4
gpt4 key购买 nike

<分区>

coinCount = [2 for i in range(4)]
total = sum(coinCount)

这给了我

TypeError: 'int' object is not callable

我不明白为什么

print type(coinCount)

给我

type <'list'>

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com