Pybites Logo

Find the user with most friends

Level: Intermediate (score: 3)

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!