Following is Python code to save file with Path
to confirm write text works or not, i use method to read the file to confirm
in this case if the file is not there it will generate the file without generating error and if the file is already there than it overwrite the text to the file