原文:TypeError: 'range' object does not support item assignment处理方法

D: gt python vectorsum.py Traceback most recent call last : File vectorsum.py , line , in lt module gt c pythonsum size File vectorsum.py , line , in pythonsum a i i TypeError: range object does not ...

2019-04-03 08:31 0 1493 推荐指数:

查看详情

TypeError: 'str' object does not support item assignment Python常见错误

1.string是一种不可变的数据类型 2.尝试使用 range()创建整数列 有时你想要得到一个有序的整数列表,所以 range() 看上去是生成此列表的不错方式。 需要记住 range() 返回的是 “range object”,而不是实际的 list 值 ...

Tue Oct 20 18:16:00 CST 2020 0 2526
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM