def split_str_to_list(input_str, split_char=","):
    """Split a string into a list of elements.

    Args:
        input_str (str): The string to split
        split_char (str, optional): The character to split the string by. Defaults
            to ",".

    Returns:
        (list): The string split into a list
    """
    # Split a string into a list using `,` char
    split_str = input_str.split(split_char)

    # For each element in split_str, strip leading/trailing whitespace
    for i, element in enumerate(split_str):
        split_str[i] = element.strip()

    return split_str