def load_file_contents(file_path, as_list=True):
    """Load file as string or list"""
    abs_file_path = join(HERE, file_path)
    with open(abs_file_path, encoding='utf-8') as file_pointer:
        if as_list:
            return file_pointer.read().splitlines()
        return file_pointer.read()
def load_file_contents ( file_path , as_list = True ) : abs_file_path = join ( HERE , file_path ) with open ( abs_file_path , encoding = 'utf-8' ) as file_pointer : if as_list : return file_pointer . read ( ) . splitlines ( ) return file_pointer . read ( )
Load file as string or list