Can someone help me understand what is actually occurring in the answer provided? I don’t understand how the function knows to parse through the dictionaries within hn_clean. If I were to run get_num_comments(hn_clean) it results in an error because list indices must be integers, but in the function most_comments = max(hn_clean, key=get_num_comments) it somehow knows to just apply the function to the dictionaries within the list. Help would be much appreciated!
The function provided is: