The use of :

Dave Anderson python at davious.org
Fri Nov 26 22:23:07 EST 2004


this is answered in the python faq:

http://www.python.org/doc/faq/general.html#why-are-colons-required-for-the-if-while-def-class-statements

> The colon is required primarily to enhance readability


Chang LI wrote:
> Some statements use : in the tail such as while x > 0: and def func():
> What is the meaning and the usage of : in Python?



More information about the Python-list mailing list