a_list = ['a', 'b', 'c', 'd', 'e']
print(len(a_list))
- What type do you think a_list is? (Hint: look at the variable name.)
- What does
len
do? - Brainstorm how you would print the first element from
a_list
.
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])
Describe what happened when the program was run. Were there any differences from your predictions?