Discuss / Python / 请问我这个程序在2.7上运行,为什么到3.6就一直死循环了?

请问我这个程序在2.7上运行,为什么到3.6就一直死循环了?

#* coding:utf-8 *

print_num=input("which loop do you wang it to be printed out\n") count = 0 while count<10000000000: if count == print_num: print("There you got the number",count) choice=input("do you wang to continue the loop?(y/n)") if choice=='n': break

else:
   while print_num<=count:
         print_num=input("which loop do you want to print out?")
         print("已经过了,sb!")

else: print("loop ",count) count +=1

else: print("loop ",count)


  • 1

Reply