Skip to content

Commit 828ec62

Browse files
authored
Update Python Lesson 3 list examples
1 parent f0e6506 commit 828ec62

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

python/lesson3/tutorial.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,25 @@ for a more complete reference:
7373

7474
>>> places_to_visit
7575
['Mexico', 'Portugal', 'Kenya', 'Nepal', 'New Zealand']
76-
76+
77+
>>> places_to_visit
78+
['Mexico', 'Portugal', 'Kenya', 'Nepal', 'New Zealand']
7779
>>> places_to_visit[1] = "Peru"
7880
>>> places_to_visit
7981
['Mexico', 'Peru', 'Kenya', 'Nepal', 'New Zealand']
8082

81-
>>> places_to_visit.pop()
82-
'Peru'
8383
>>> places_to_visit
8484
['Mexico', 'Portugal', 'Kenya', 'Nepal', 'New Zealand']
85+
>>> places_to_visit.pop()
86+
'New Zealand'
87+
>>> places_to_visit
88+
['Mexico', 'Portugal', 'Kenya', 'Nepal']
8589

86-
>>> places_to_visit.append("Columbia")
8790
>>> places_to_visit
88-
['Mexico', 'Portugal', 'Kenya', 'Nepal', 'New Zealand', 'Columbia']
91+
['Mexico', 'Portugal', 'Kenya', 'Nepal', 'New Zealand']
92+
>>> places_to_visit.append("Colombia")
93+
>>> places_to_visit
94+
['Mexico', 'Portugal', 'Kenya', 'Nepal', 'New Zealand', 'Colombia']
8995

9096
Try some of these out yourself:
9197

0 commit comments

Comments
 (0)