control structures exception handling custom functions control structures and functions |||this first two sections cover python' control structureswith the first section dealing with branching and looping and the second section covering exception-handling most of the control structures and the basics of exception-handling were introduced in but here we give more complete coverageincluding additional control structure syntaxesand how to raise exceptions and create custom exceptions the third and largest section is devoted to creating custom functionswith detailed coverage of python' extremely versatile argument handling custom functions allow us to package up and parameterize functionality--this reduces the size of our code by eliminating code duplication and provides code reuse (in the following we will see how to create custom modules so that we can make use of our custom functions in multiple programs ||control structures python provides conditional branching with if statements and looping with while and for in statements python also has conditional expression--this is kind of if statement that is python' answer to the ternary operator (?:used in -style languages |conditional branching as we saw in this is the general syntax for python' conditional branch statementif boolean_expression suite