为什么Pycharm在运行中具有不同的输出。和DEBUG?
我对set()有问题。此代码在“运行”和“调试”中具有不同的输出。
n = set(input()) #input - 3490
m = set(input()) #input - 9340
if n == m:
print(True)
else:
print(False)
运行 - 错误,调试 - 是的。 我不明白为什么会发生这种情况。请帮忙 Python 3.10
I have a problem with set(). This code has different output in 'Run' and in 'Debug'.
n = set(input()) #input - 3490
m = set(input()) #input - 9340
if n == m:
print(True)
else:
print(False)
Run - False, Debug - True.
I can't understand why this is happened. Please help
Python 3.10
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
那是Pycharm 2022.1.1的回归。它在运行期间错误地处理了stdin,因此差异。 https:// youtrack。 jetbrains.com/issue/py-54238/stdin-is-lost-for-a-second-input-call
更新为 2022.1.2 RC(释放候选)解决问题的地方
That's a regression in PyCharm 2022.1.1. It handles STDIN incorrectly during the Run hence the difference. https://youtrack.jetbrains.com/issue/PY-54238/STDIN-is-lost-for-a-second-input-call
Update to 2022.1.2 RC (release candidate) where the problem is resolved