The Python program should try to avoid the notation of while True:

Source: Internet
Author: User

When I recently wrote a python program, I found that many of my colleagues tried to avoid using a for loop while using the while loop, especially when using the while Ture: in the same way that while Ture: is an infinite loop, which I used to use when writing shell tasks. But I generally pay attention to the use of Slepp 60来 control. In fact, this is a very bad style, because such loops are often complex and difficult to understand, and easy to cause a cycle of death, we should be written in both the Python program and shell level should be avoided as far as possible.

This article is from the "Fuqin Wine" blog, please make sure to keep this source http://yuhongchun.blog.51cto.com/1604432/1635465

The Python program should try to avoid the notation of while True:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.