f = 'F:/program_work/python_work/GuLDA/gaussianLda_data/shortdoc.txt'
with open(f, 'r') as fi:
docs = fi.read().splitlines() # These are all cleaned out
fi.close()
print(docs)
输出结果为:
f = 'F:/program_work/python_work/GuLDA/gaussianLda_data/shortdoc.txt'
with open(f, 'r') as fi:
docs = fi.read().splitlines() # These are all cleaned out
fi.close()
print(docs)
输出结果为: