返回顶部

收藏

Reading the entire file into a list.

更多
print '\nReading the entire file into a list.'
text_file = open('read_it.txt', 'r')
lines = text_file.readlines()
print lines
print len(lines)
for line in lines:
    print line
text_file.close()

标签:Python,File

收藏

0人收藏

支持

0

反对

0

发表评论