Last Updated: September 30, 2021
·
2.649K
· skysnap

Python I/O Open Close File

Open a file

fo = open("sample.txt", "wb")
fo.write( "This is sample.\nSave this in file!!\n");

Close open file

fo.close()

1 Response
Add your response

better with with

over 1 year ago ·