PyCharm,范围,应为类型“\u SupportsIndex”,改为“int”

2024-09-25 00:32:08 发布

您现在位置:Python中文网/ 问答频道 /正文

如何清除这些讨厌的黄色东西

Expected type '_SupportsIndex', got 'int' instead

当我没有GitHub桌面应用程序或者我没有更新PyCharm时,它们就不存在了

str0 = input()
str1 = input()
k = str1.count(str0)
i = 0
for i in range(k, 0, -1):
    if (str0 * i) in str1:
        break
print(i)

这是PyCharm向我展示的:

This is what PyCharm shows me


Tags: ingithub应用程序inputtype桌面pycharmint