def get_edges(cities, graph):
    """ Takes in a list of city names and a graph that is a route map from an
    airline and returns a tuple including a bool signifying if the route is
    nonstop and the price of the trip
    """
    if not isinstance(cities, list):
        return (False, '$0')
    if len(cities) < 2:
        return (False, '$0')
    sum = 0
    for i in range(0, (len(cities)-1)):
        try:
            sum += graph.graph[cities[i]][cities[i+1]]

        except (KeyError):
            return (False, '$0')
    return(True, f'${sum}')