Skip to content

Commit 0f15455

Browse files
Merge pull request #364 from ecmendenhall/python-lesson3-example-fix
Fix Python Lesson 3 examples
2 parents 1c03357 + 6b43214 commit 0f15455

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/lesson3/tutorial.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ many levels deep you can go before your code is too confusing:
134134
'chocolate'
135135

136136
cake_flavours[1]
137-
['chocolate cake', 'vanilla icing']
137+
['chocolate', 'vanilla']
138138

139139
cake_flavours[1][1]
140-
'vanilla icing'
140+
'vanilla'
141141

142142
There's a lot more things you can do with lists including concatenating,
143143
diffing, sorting, and (scary, but fun) subclassing. This is enough to get you
@@ -171,10 +171,10 @@ tuple, you can always *cast* it as a list:
171171
my_tuple = (1, 2, 3)
172172

173173
my_list = list(my_tuple)
174-
my_list[3] = 99
174+
my_list[2] = 99
175175

176176
my_list
177-
[1, 2, 3, 99]
177+
[1, 2, 99]
178178

179179
my_tuple
180180
(1, 2, 3)

0 commit comments

Comments
 (0)