Posted on 20th April 2024
Here is an example to check if the file exists and to create if there is no file
import os.path
file_exists = os.path.isfile(file_name)
if file_exists:
# staments
else:
# staments to create a file
STILL GOT QUERIES?