1/3
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Based on this list what is the value of my_list[0]
my_list = [10, 20, 30, 40, 50]
10
Explained
Python list indexing starts at 0, so the first element is at index 0.
Based on this list what is the value of my_list[-1]
my_list = [10, 20, 30, 40, 50]
50
Explained
A negative index counts from the end of the list. -1 is the last element
Based on this list what is the value of my_list[1:3]
my_list = [10, 20, 30, 40, 50]
[20:30]
Explained
Slicing [1:3] includes index 1 but stops before index 3.
Based on this list what is the value of my_list[:2]
my_list = [10, 20, 30, 40, 50]
**