Python3报错:TypeError: string indices must be integers
问题如下图所示:
原因在于for循环中的i代表String类型变量,而List中的i代表Int类型变量,二者冲突,导致出错。
附:常用的AI工具箱
链接:https://hxmbzkv9u5i.feishu.cn/docx/Mv4Dd8TEYoUmTAxfpLtcUoOKnZc?from=from_copylink