Website hosting and domain hosting service by Active-Venture.com
  

 Back to Index

7.1 The if statement

The if statement is used for conditional execution:

 

if_stmt  ::=  "if" expression ":" suite
    ( "elif" expression ":" suite )*
    ["else" ":" suite]
Download entire grammar as text.

It selects exactly one of the suites by evaluating the expressions one by one until one is found to be true (see section 5.10 for the definition of true and false); then that suite is executed (and no other part of the if statement is executed or evaluated). If all expressions are false, the suite of the else clause, if present, is executed.

 

  

 

2002-2004 Active-Venture.com Website Hosting Service

 

Disclaimer: This documentation is provided only for the benefits of our hosting customers.
For authoritative source of the documentation, please refer to http://python.org/doc/

 

Active-Domain.com offers cheap domain registration, domain name transfer and domain search services   Cheap domain name - Cheap domain name registration service including free domain hosting services  

Domain registration : Buy domain name or register domain name from $5.95/year only