是什么导致我在python2.7中的代码中出现这种无意的无限循环?

2024-05-04 15:22:03 发布

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

在python2.7中,我的代码中出现了意外的无限循环,但在python3.5中却给出了错误消息,这是什么原因呢?你知道吗

python3.5给出了TypeError: unorderable types: str() > int(),我应该如何解决它?你知道吗

程序

condition = '2'

while condition > 5:

    print 'test'

Tags: 代码test程序消息错误原因conditionint