【发布时间】:2021-07-14 10:12:00
【问题描述】:
如何清除这些烦人的黄色东西?
预期类型为“_SupportsIndex”,改为“int”
当我没有 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 向我展示的:
【问题讨论】:
-
不确定代码的作用,但是当我将代码粘贴到 PyCharm 中时,我没有收到这些警告。也许更新应用程序
-
使用标准检查设置更新的 PyCharm 不会发生这种情况。无法重现。