Chaining if...else Statements 69
Metasyntax 69
Additional for Loop Patterns 71
Useful Control Flow Patterns 76
Using continue to Reduce Conditional Nesting 76
Using break or return to Avoid Unnecessary Computation 76
Using Value of Index After Loop Completion 77
Using Descending Indexes When Modifying Lists 77
Conclusion 78
5.
Operators 81
Logical Operators with Nonboolean Operands 91
Expressions in Template Strings 100
Expressions and Control Flow Patterns 100
Converting if...else Statements to Conditional Expressions 100
Converting if Statements to Short-Circuited Logical OR Expressions 101
Conclusion 101
6.
Return Values 104
Table of Contents | vii