Do Now: 2.05
Open up the terminal. Type the following code.
a_list = ['a', 'b', 'c', 'd', 'e']
print(len(a_list))
What type do you think a_list is? (Hint: look at the name of the variable)
What does len
do?
Brainstorm how you would print the first element from a_list
?
Type the following into the terminal. What happens?
a_list = ['a', 'b', 'c', 'd', 'e']
print(a_list[0])
print(a_list[1])
print(a_list[2])
print(a_list[3])
print(a_list[4])
print(a_list[5])
print(a_list[6])