import random


def select_user_agent(agent_list):
    """Select random user agent from pre-loaded list of agents. """
    n_agents = len(agent_list)
    agent = {}
    agent["user-agent"] = agent_list[random.randint(0, n_agents-1)].replace("\n", "").replace("\"", "")
    return agent