File handling on python| Create, Open, Read, Write files using python #python #filehandling #coders

2 years ago
6

SUBSCRIBE FOR MORE VIDEOS LIKE THIS
#python project #anaconda spyder #Geomatics #Engineering #coders #GIS #Autocad #QGIS #engineeringconcepts

Python too supports file handling and allows users to handle files i.e., to read and write files, along with many other file handling options, to operate on files.
Four ways of handling files;

"r" - Read - Default value. Opens a file for reading, error if the file does not exist

"a" - Append - Opens a file for appending, creates the file if it does not exist

"w" - Write - Opens a file for writing, creates the file if it does not exist

"x" - Create - Creates the specified file, returns an error if the file exists

Loading comments...