参考TypeError: string indices must be integers - 云+社区 - 腾讯云
Python3报错:TypeError: string indices must be integers
问题如下图所示:原因在于for循环中的i代表String类型变量,而List中的i代表Int类型变量,二者冲突,导致出错。
参考TypeError: string indices must be integers - 云+社区 - 腾讯云
问题如下图所示:原因在于for循环中的i代表String类型变量,而List中的i代表Int类型变量,二者冲突,导致出错。