Question 5: A unique aspect of VALORANT is its agent selection…. Question 5:A unique aspect of VALORANT is its agent selection. Agents are characters players can choose to play as in each match. Given a list of dictionaries that contain information on agents and players across matches (with each dictionary representing a single match), return a single output dictionary that contains information on each of the players and the agents they played across matches.The inputdict_list is a list of dictionaries where thekeys are theagent names (as strings) and thevalues are theplayers’ usernames (as strings).Example input:[{‘Jett’: ‘Shroud’, ‘Brimstone’: ‘TenZ’, ‘Raze’: ‘Hiko’}, {‘Jett’: ‘Shroud’}, {‘Breach’: ‘TenZ’}]’Jett’, ‘Brimstone’, ‘Raze’, and ‘Breach’are agent names – they are the keys in the input dictionaries.’Shroud’, ‘TenZ’, and ‘Hiko’are player names – they are the values in the input dictionaries.The output dictionary should have theplayers’ usernames askeys, with the values being alist of the agent names they have played across the matches (the various dictionaries) in the input list. It is possible to have multiples of the same agent in a player’s list of agents if they have played that agent across various matches.Example output (using input from above):{‘Shroud’: [‘Jett’, ‘Jett’], ‘TenZ’: [‘Brimstone’, ‘Breach’], ‘Hiko’: [‘Raze’]}The output dictionary has the player names as the keys, with the agents they have played stored in a list. The output dictionary should have the players and agents in the order in which they first appear in the input list’s dictionaries.Due to the nature of dictionaries, you can assume that the agent names in a single dictionary will be unique as they are the keys. However, as shown in the example, the same agent can be in a separate dictionary that represents a different match.If the input list is empty or only empty dictionaries are passed in the list, return an empty dictionary.Hint: Try building out a new dictionary rather than modifying the dictionary that is passed in. There are separate operations you need to do if a key/value doesn’t already exist in the dictionary, vs. if the key/value already exists.If the key doesn’t already exist in the dictionary, you need to define its value (in this case it is a list). Once the key and value are defined in the dictionary, you can append new elements to the value list.Hint: You may find it useful to use anested loop for this problem so that you can easily process each of the dictionaries in the list, without worrying about how many dictionaries are included in the input list. A nested loop is a loop inside of a loop. In this case, our outer loop could be looping through each of the dictionaries inside ofdict_list. The inner loop could be where we are processing an individual dictionary by looping through its key-value pairs.defmatch_history(dict_list): “””>>> match_history([{‘Jett’: ‘Shroud’, ‘Brimstone’: ‘TenZ’, ‘Raze’: ‘Hiko’},{‘Jett’: ‘Shroud’}, {‘Breach’: ‘TenZ’}]){‘Shroud’: [‘Jett’, ‘Jett’], ‘TenZ’: [‘Brimstone’, ‘Breach’], ‘Hiko’: [‘Raze’]}>>> match_history([{‘Sage’: ‘nitr0’, ‘Skye’: ‘dapr’, ‘Astra’: ‘ScreaM’}]){‘nitr0’: [‘Sage’], ‘dapr’: [‘Skye’], ‘ScreaM’: [‘Astra’]}>>> match_history([]){}”””Computer ScienceEngineering & TechnologyPython Programming DSC 20

Order your essay today and save 20% with the discount code ESSAYHELP