![](https://csdnimg.cn/release/download_crawler_static/88268042/bg3.jpg)
Section 6.3: Parsing string to datetime object 50 .........................................................................................................
Chapter 7: Enum 51 ..........................................................................................................................................................
Section 7.1: Creating an enum (Python 2.4 through 3.3) 51 .........................................................................................
Section 7.2: Iteration 51 ...................................................................................................................................................
Chapter 8: Set 52 ...............................................................................................................................................................
Section 8.1: Operations on sets 52 ..................................................................................................................................
Section 8.2: Get the unique elements of a list 53 ..........................................................................................................
Section 8.3: Set of Sets 53 ................................................................................................................................................
Section 8.4: Set Operations using Methods and Builtins 53 .........................................................................................
Section 8.5: Sets versus multisets 55 ..............................................................................................................................
Chapter 9: Simple Mathematical Operators 57 .................................................................................................
Section 9.1: Division 57 .....................................................................................................................................................
Section 9.2: Addition 58 ....................................................................................................................................................
Section 9.3: Exponentiation 59 ........................................................................................................................................
Section 9.4: Trigonometric Functions 60 ........................................................................................................................
Section 9.5: Inplace Operations 61 .................................................................................................................................
Section 9.6: Subtraction 61 ..............................................................................................................................................
Section 9.7: Multiplication 61 ...........................................................................................................................................
Section 9.8: Logarithms 62 ..............................................................................................................................................
Section 9.9: Modulus 62 ...................................................................................................................................................
Chapter 10: Bitwise Operators 65 .............................................................................................................................
Section 10.1: Bitwise NOT 65 ............................................................................................................................................
Section 10.2: Bitwise XOR (Exclusive OR) 66 ..................................................................................................................
Section 10.3: Bitwise AND 67 ............................................................................................................................................
Section 10.4: Bitwise OR 67 ..............................................................................................................................................
Section 10.5: Bitwise Left Shift 67 ....................................................................................................................................
Section 10.6: Bitwise Right Shift 68 ..................................................................................................................................
Section 10.7: Inplace Operations 68 ................................................................................................................................
Chapter 11: Boolean Operators 69 ............................................................................................................................
Section 11.1: `and` and `or` are not guaranteed to return a boolean 69 ......................................................................
Section 11.2: A simple example 69 ...................................................................................................................................
Section 11.3: Short-circuit evaluation 69 .........................................................................................................................
Section 11.4: and 70 ...........................................................................................................................................................
Section 11.5: or 70 ..............................................................................................................................................................
Section 11.6: not 71 ............................................................................................................................................................
Chapter 12: Operator Precedence 72 ......................................................................................................................
Section 12.1: Simple Operator Precedence Examples in python 72 .............................................................................
Chapter 13: Variable Scope and Binding 73 .........................................................................................................
Section 13.1: Nonlocal Variables 73 .................................................................................................................................
Section 13.2: Global Variables 73 ....................................................................................................................................
Section 13.3: Local Variables 74 ......................................................................................................................................
Section 13.4: The del command 75 .................................................................................................................................
Section 13.5: Functions skip class scope when looking up names 76 .........................................................................
Section 13.6: Local vs Global Scope 77 ...........................................................................................................................
Section 13.7: Binding Occurrence 79 ...............................................................................................................................
Chapter 14: Conditionals 80 .........................................................................................................................................
Section 14.1: Conditional Expression (or "The Ternary Operator") 80 .........................................................................
Section 14.2: if, elif, and else 80 .......................................................................................................................................
Section 14.3: Truth Values 80 ...........................................................................................................................................