def get_csv(csv, type):
    """ Convert a comma separated string of values to list of given type
    :param csv: Comma separated string
    :type csv: str
    
    :param type: a type casting function, e.g. float, int, str
    :type type: function
    
    :returns: A list of values of type type
    :rtype: list[type]
    """
    
    if type==str:
        return [str(itm).strip() for itm in csv.split(',')]
    else:
        return [type(itm) for itm in csv.split(',')]