Skip to content

Conversation

@ecmendenhall
Copy link
Contributor

Here are some changes to the list examples in Python lesson 3 that make them a little more clear. My pair ran into some confusion with two things:

  1. This example seems to be wrong:
>>> places_to_visit
['Mexico', 'Peru', 'Kenya', 'Nepal', 'New Zealand']

>>> places_to_visit.pop()
'Peru'
>>> places_to_visit
['Mexico', 'Portugal', 'Kenya', 'Nepal', 'New Zealand']

.pop() will pop off the last element of the list, 'New Zealand'.

  1. It seems clearer to explicitly reset the list before each example. We were a little confused about whether the examples are supposed to be one continuous REPL session or isolated examples.

(Also included a little typo fix for "Colombia" 🇨🇴 😸 🇨🇴 )

@ecmendenhall ecmendenhall reopened this Sep 15, 2017
@matyikriszta matyikriszta merged commit 0bfc003 into codebar:gh-pages Sep 21, 2017
@matyikriszta
Copy link
Contributor

I agree it's probably a good idea to reset the list to make it clearer what each method does. Thanks @ecmendenhall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants