Open mdusan opened 7 years ago
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.
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"