按行读取

filename = r'F:\PyCharm\test\file.txt'
content = ''
with open(filename,'r') as file:
	content = file.readlines()