Page 17 - think python 2
P. 17
Contents
xvii
10 Lists
89
10.1 Alistisasequence ................................ 89
10.2 Listsaremutable ................................. 90
10.3 Traversingalist .................................. 91
10.4 Listoperations................................... 91
10.5 Listslices...................................... 91
10.6 Listmethods.................................... 92
10.7 Map,filterandreduce .............................. 93
10.8 Deletingelements................................. 94
10.9 Listsandstrings.................................. 94
10.10 Objectsandvalues ................................ 95
10.11 Aliasing....................................... 96
10.12 Listarguments................................... 97
10.13 Debugging..................................... 98
10.14 Glossary ...................................... 100
10.15 Exercises ...................................... 100
11 Dictionaries 103
11.1 Adictionaryisamapping ............................ 103 11.2 Dictionaryasacollectionofcounters...................... 104 11.3 Loopinganddictionaries............................. 106 11.4 Reverselookup .................................. 106 11.5 Dictionariesandlists ............................... 107 11.6 Memos....................................... 109 11.7 Globalvariables.................................. 110 11.8 Debugging..................................... 111 11.9 Glossary ...................................... 112 11.10 Exercises ...................................... 113