Reading and Writing : Open : File PYTHON TUTORIALS


PYTHON TUTORIALS » File » Open »

 

Reading and Writing


f = open('test.txt', 'w')
f.write('Hello, ')
f.write('World!')
f.close()


f = open('test.txt', 'r')
print f.read(4)
print f.read()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo File
» Open