list in action

We've already covered lists a little, and we've been making good use of them. We know how to create lists using the literal syntax, add to them using the append() method, and get at and modify their contents using the square brackets indexing with positive, zero-based indexes.

Zero and positive integers index from the front of a list, so index four is the fifth element in the list:

Figure 5.5:  Zero and positive integers index

Now we'll take a deeper look.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset