11.3. STATISTICSWITHLISTS 181
We have seenhow listscangrow byappendingnew items.Listscanalsoshrinkwhenitemsaredeleted.
Individualitemsorentireslicescanberemovedfroma listusingthedeloperator.
myList
[34, 26, 0, 10]
del myList[1]
myList
[34, 0, 10]
del myList[1:3]
myList
[34]
Asyoucansee,Pythonlistsprovidea veryflexiblemechanismforhandlingindefinitelylargesequences
ofdata.Usinglistsis easyif youkeepthesebasicprinciplesinmind: