def get_data(fn, split=False, split_char=None, filter_blanks=False):
    """
    :param fn: filename to open
    :param split: if you want to split the data read
    :param split_char: character you want to split the data on
    :param filter_blanks: remove empty strings if split=True
    Example:
    >>>data = get_data('file.txt', split=True, split_char=",")
    >>>print(data)
    [1, 2, 3, 4]
    """
    with open(fn, encoding='utf-8') as f:
        data = f.read()
        if split:
            if split_char:
                data = data.split(split_char)
                if filter_blanks:
                    data = [s.strip() for s in data if s.strip() != '']
    return data