Creating a List and Reading an Item
A list stores multiple values in order.
colors = ["red", "blue", "green"]
print(colors[0])Here is what the example does:
colorscreates a list and stores it incolors.print(colors[0])displays the result ofcolors[0].
The assignment changes the specific values, but the basic pattern is the same.
Assignment
Complete the starter code so the program does the following:
- Set
itemsto['rope', 'torch', 'map']. - Print
items[0].
Your finished program should print exactly this output:
ropeBe very careful with capitalization, spaces, and line breaks. The output must match exactly.