Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update introduction.py #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update introduction.py #36

wants to merge 1 commit into from

Conversation

mdusan
Copy link

@mdusan mdusan commented Apr 21, 2017

Updated to fully correspond to the exercises in the book with:
(1) Deleted user[10] because the data about him is not provided and he's not listed in the users list in the book (page 3)
(2) Appended part of the code from the book (page 5) for sorting the users from "most friends" to "least friends"

Updated with:
(1) Deleted user[10] because the data about him is not provided and he's not listed in the users list in the book (page 3)
(2) A part of the code from the book (page 5) for sorting the users from "most friends" to "least friends".
@plkoehn
Copy link

plkoehn commented Jul 25, 2017

I am puzzled by the syntax error present in the "key=" line, line 54. As written, the code does not run (Python 3.5). The following does run, however:

tst = sorted(num_friends_by_id, key = lambda x: x[1], reverse = True)

I don't know, however, why the original version will not run.

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