您的位置: 首页 > 文章 > python报错:TypeError: ‘type‘ object is not subscriptable python报错:TypeError: ‘type‘ object is not subscriptable 分类: 文章 • 2023-04-01 16:51:28 项目场景: 问题描述: python报错:TypeError: 'type' object is not subscriptable 原因分析: 数组不存在 解决方案: 把对数组的排序写成了 c=c.sort() 但实际上应该是 c.sort() 而 c=sorted(c)