def read_file(fp, mode='lines'):
    """读取文件内容，mode[lines|str]"""
    with open(fp, 'r', encoding='utf-8') as f:
        if mode == 'lines':
            return f.readlines()
        if mode == 'str':
            return f.read()
