Page 16 - think python 2
P. 16

xvi Contents
 7 Iteration
63
7.1 Reassignment ................................... 63
7.2 Updatingvariables ................................ 64
7.3 Thewhilestatement ............................... 64
7.4 break........................................ 66
7.5 Squareroots .................................... 66
7.6 Algorithms..................................... 67
7.7 Debugging..................................... 68
7.8 Glossary ...................................... 68
7.9 Exercises ...................................... 69
8 Strings 71
8.1 Astringisasequence............................... 71
8.2 len ......................................... 72
8.3 Traversalwithaforloop............................. 72
8.4 Stringslices......
8.5 Strings are immutable
8.6 Searching........
8.7 Loopingandcounting
8.8 String methods . . . .
8.9 Theinoperator .................................. 76
8.10 Stringcomparison................................. 77
8.11 Debugging..................................... 77
8.12 Glossary ...................................... 79
8.13 Exercises ...................................... 79
.............................. 73 .............................. 74 .............................. 74 .............................. 75 .............................. 75
9 Case study: word play 83
9.1 Readingwordlists ................................ 83
9.2 Exercises ...................................... 84
9.3 Search........................................ 85
9.4 Loopingwithindices ............................... 86
9.5 Debugging..................................... 87
9.6 Glossary ...................................... 87
9.7 Exercises ...................................... 88
































































   14   15   16   17   18