How to realize cycle Control in python
This article mainly introduces python how to achieve loop control, the article introduces in great detail, has a certain reference value, interested friends must read it!
Endless cycle
# / usr/bin/env pythoninput_number=19while True: # = = > Infinite Loop number=int (input ("please input your number:")) # = = > Note that python3.0 defaults to entering a string Need int conversion if number = = input_number: print ("the number you put is true") break # = > end the loop elif number > input_number: print ("the number you put is big") else: print ("the number you put is small") these are all the contents of the article "how python implements Loop Control" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!