分享

成功解决TypeError: object of type ‘int‘ has no len()

 处女座的程序猿 2021-09-28

解决问题

TypeError: object of type 'int' has no len()


解决思路

类型错误:“int”类型的对象没有len()

解决方法

很简单的错误,但是粗心导致!

plt.xticks(3, ['111','222','333'])
改为
plt.xticks([1,2,3], ['111','222','333'])

    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多