Question: Write a function called popular_author that accepts a list of book dictionaries b as a parameter, and returns a string with the full name(s)

Write a function called popular_author that accepts a list of book dictionaries b as a parameter, and returns Sample >>> popular_author ([{'title' : 'C++ How to Program , 'author' : 'Harvey Deitel', 'year': '1994'},

Write a function called popular_author that accepts a list of book dictionaries b as a parameter, and returns a string with the full name(s) of the most popular author(s) (sorted), separated by a comma if need be.. Note Each dictionary object in the list will contain three keys, 'title', 'author', and 'year' Sample >>> popular_author ([['title': 'C++ How to Program , 'author' : 'Harvey Deitel', 'year': '1994'}, {'title': 'Introduction to Algorithms', 'author': 'Charles E. Leiserson', 'year': '1989'), ['title': 'C# for Programmers', 'author': 'Harvey Deitel', 'year' : '2008'], ['title': 'Code Complete' , 'author': 'Steve McConnell', 'year': '1993'}]) Harvey Deitel >>> popular_author ([['title': 'Advanced Research in VLSI' 'author' 3 : 'Charles E. Leiserson', 'year': '1986'}, {'title': 'C++ How to Program', 'author': 'Harvey Deitel', 'year': '1994'}, {'title': 'Introduction to Algorithms', 'author': 'Charles E. Leiserson', 'year': '1989'], ['title': 'C# for Programmers', 'author': 'Harvey Deitel', 'year': '2008'], ['title': 'Code Complete' , 'author' : 'Steve McConnell', 'year': '1993'}]) Charles E. Leiserson, Harvey Deitel Input/Output Input consists of a list literal that HackerRank will read in as b, pass to your function, and then output the resulting string. Constraints b will contain at least one book record.

Step by Step Solution

3.28 Rating (145 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres the Python function popularauthor python def popularauthorbooks authorcount Count the occurren... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!