Skip to content

Commit d2f5466

Browse files
author
Philip Guo
committed
trying to get the kinks out of lessons
1 parent 5d885f9 commit d2f5466

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎v3/lessons/dive-into-python-311.txt‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ li.extend(["two", "elements"])
1111

1212
"description": "This lesson was derived from Section 3.2 of <a href='http://www.diveintopython.net/native_data_types/lists.html'>Dive Into Python</a>.",
1313

14-
"2": "First, you define a list of five elements. Note that they retain their original order. This is not an accident. A list is an ordered set of elements enclosed in square brackets.",
14+
"1": "First, you define a list of five elements. Note that they retain their original order. This is not an accident. A list is an ordered set of elements enclosed in square brackets.",
1515

16-
"3": "You can get a subset of a list, called a \"slice\", by specifying two indices. The return value is a new list containing all the elements of the list, in order, starting with the first slice index (in this case <code>li[1]</code>), up to but not including the second slice index (in this case <code>li[3]</code>).",
16+
"2": "You can get a subset of a list, called a \"slice\", by specifying two indices. The return value is a new list containing all the elements of the list, in order, starting with the first slice index (in this case <code>li[1]</code>), up to but not including the second slice index (in this case <code>li[3]</code>).",
1717

18-
"4": "Slicing works if one or both of the slice indices is negative. If it helps, you can think of it this way: reading the list from left to right, the first slice index specifies the first element you want, and the second slice index specifies the first element you don't want. The return value is everything in between.",
18+
"3": "Slicing works if one or both of the slice indices is negative. If it helps, you can think of it this way: reading the list from left to right, the first slice index specifies the first element you want, and the second slice index specifies the first element you don't want. The return value is everything in between.",
1919

20-
"5": "Lists are zero-based, so <code>li[0:3]</code> returns the first three elements of the list, starting at <code>li[0]</code>, up to but not including <code>li[3]</code>.",
20+
"4": "Lists are zero-based, so <code>li[0:3]</code> returns the first three elements of the list, starting at <code>li[0]</code>, up to but not including <code>li[3]</code>.",
2121

22-
"6": "<code>append</code> adds a single element to the end of the list.",
22+
"5": "<code>append</code> adds a single element to the end of the list.",
2323

24-
"7": "<code>insert</code> inserts a single element into a list. The numeric argument is the index of the first element that gets bumped out of position. Note that list elements do not need to be unique; there are now two separate elements with the value '<code>new</code>', <code>li[2]</code> and <code>li[6]</code>.",
24+
"6": "<code>insert</code> inserts a single element into a list. The numeric argument is the index of the first element that gets bumped out of position. Note that list elements do not need to be unique; there are now two separate elements with the value '<code>new</code>', <code>li[2]</code> and <code>li[6]</code>.",
2525

26-
"8": "<code>extend</code> concatenates lists. Note that you do not call <code>extend</code> with multiple arguments; you call it with one argument, a list. In this case, that list has two elements."
26+
"7": "<code>extend</code> concatenates lists. Note that you do not call <code>extend</code> with multiple arguments; you call it with one argument, a list. In this case, that list has two elements."
2727

2828
}

0 commit comments

Comments
 (0)