We use Python 3.6

go back Level: Intermediate (img: IM / score: 3) level Bite 123. Find the user with most friends

13 out of 13 users completed this Bite ...
Will you be Pythonista #14 to crack this Bite?
Average Bite difficulty 1-10 rating: 7.0
» Up for a challenge? 💪

In this Bite you are presented with a users dict of keys=id's and values=usernames and a friendships list of user ID tuples expressing a friendship between two users.

Loop through friendships and find out which user has the most friends. Return a tuple of friend name and his or her friends. Have fun!

Github login button