返回顶部

收藏

Use file pointer to get file content

更多
f = open('somefile.txt', 'w')
print >> f, 'This is the first line'
print >> f, 'This is the second line'
print >> f, 'This is the third line'
f.close()

标签:Python,File

收藏

0人收藏

支持

0

反对

0

发表评论