Question 8 Write a program that checks to see if the file name exists,
it will give you an error message, if not, it will create the file.
Imports the ‘os module’
Checks if the file already exists
Prints error message if the file already exists
If the file doesn’t exist, creates a new file
CA Maninder Singh
CA Maninder Singh is a Chartered Accountant for the past 12 years. He also provides Accounts Tax GST Training in Delhi, Kerala and online.