Last Updated: September 30, 2021
·
2.646K
· 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 ·