def to_list(list_str):
    """Convert a string to a list.
    """
    # strip list of square brackets and remove all whitespace
    stripped_list_str = list_str.replace("\n", "")\
        .replace(" ", "").replace("\t", "")\
        .strip("][").rstrip(",")
    # check empty list
    if stripped_list_str == "":
        return []
    return [v.strip('"').strip("'") for v in stripped_list_str.split(",")]