#!/usr/bin/env python3

# Author ID: hcawong

def read_file_string(file_name):
    f = open(file_name, 'r')
    m = f.read()
    f.close
    return m

    # Takes file_name as string for a file name, returns its entire contents as a string

def read_file_list(file_name):
    # Takes a file_name as string for a file name, 
    # return its entire contents as a list of lines without new-line characters


    f = open(file_name, 'r')
    a = f.read().splitlines()
    f.close
    return a
if __name__ == '__main__':
    file_name = 'data.txt'
    print(read_file_string(file_name))
    print(read_file_list(file_name))
