def func_guard(input_str, chars_to_replace=['*', '/']):
    """
    Return a string with chars illegal in variable names replaced.

    :param str input_str: string to be replaced.
    :param list chars_to_replace: list of illegal chars.
    """
    for c in chars_to_replace:
        input_str = input_str.replace(c, '_')
    return input_str