Learn 3 Easy Steps to Create, Write and Read File on MAC with Python

Hi All ,

Some time we have to create a file to store some data for our application and also read that file whenever we need it. So in this tutorial we will learn how to create a file on MAC system using python and also reading and writing on file.

1) Create a file :- In this function we just have to provide PATH and FILE_NAME. Please avoid to use private path where special permission is required.

  1. def createFile(path,filename):
  2. name = path+’/’+filename # Name of text file coerced with +.txt
  3. try:

Continue your reading here>> Easy Steps to Create, Write and Read File on MAC with Python