Difference between revisions of "Python List Exercises"
From WLCS
(New page: == Objectives == * You will learn to create lists * You will learn to access elements (things) in a list * You will learn to traverse (walk through) a list using a loop == Resources == * ...) |
(No difference)
|
Revision as of 07:18, 13 May 2010
Objectives
- You will learn to create lists
- You will learn to access elements (things) in a list
- You will learn to traverse (walk through) a list using a loop
Resources
Directions
Create a file name ch9_yourLastName.py
- Create a list named wordList that contains the following words: "washington", "lee", "generals", "arlington", "virginia"
- Print out the first element in wordList
- Print out the length of the list by using len(wordList)
- Print out the last element in wordList by using wordList[len(wordList)-1]
- Print out the word "generals" in the list