@@ -73,19 +73,22 @@ for a more complete reference:
7373
7474 >>> places_to_visit
7575 ['Mexico', 'Portugal', 'Kenya', 'Nepal', 'New Zealand']
76-
76+
77+ >>> places_to_visit = ['Mexico', 'Portugal', 'Kenya', 'Nepal', 'New Zealand']
7778 >>> places_to_visit[1] = "Peru"
7879 >>> places_to_visit
7980 ['Mexico', 'Peru', 'Kenya', 'Nepal', 'New Zealand']
8081
82+ >>> places_to_visit = ['Mexico', 'Portugal', 'Kenya', 'Nepal', 'New Zealand']
8183 >>> places_to_visit.pop()
82- 'Peru '
84+ 'New Zealand '
8385 >>> places_to_visit
84- ['Mexico', 'Portugal', 'Kenya', 'Nepal', 'New Zealand' ]
86+ ['Mexico', 'Portugal', 'Kenya', 'Nepal']
8587
86- >>> places_to_visit.append("Columbia")
88+ >>> places_to_visit = ['Mexico', 'Portugal', 'Kenya', 'Nepal', 'New Zealand']
89+ >>> places_to_visit.append("Colombia")
8790 >>> places_to_visit
88- ['Mexico', 'Portugal', 'Kenya', 'Nepal', 'New Zealand', 'Columbia ']
91+ ['Mexico', 'Portugal', 'Kenya', 'Nepal', 'New Zealand', 'Colombia ']
8992
9093Try some of these out yourself:
9194
0 commit comments