|
||||||||||||||||||||||||||||||||||
Home Products Download Tutorials
Web Ring/Links Contact |
Block iterative or block conditionalAs other programming language Python can manage conditional or iterative code, but it does not have special characters to identify them. Only the indent identifies a block. Two characters are allowed, the space and the tabulation. However, all the lines in a block must be indent in the same way. Because, use a tabulation is not equal to the number equivalent of spaces. Remark: a block in the interpreter must finish by an empty line. A blocks inside a Python script have not such limitation.The real examples of indentation are in the chapter while.Examples :
ConditionsThere is the table of arithmetic or string condition to create conditional block.Non boolean conditions
whileAllow looping on a counter variable basis.Examples :
|
|
||||||||||||||||||||||||||||||||
|