Skip to content

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