read using one of the read operationsit cannot be read again for exampleif you were to first run days_file read(followed by days_file readlines(the second operation would return an empty string thereforeanytime you wish to read from file you will have to first open new file variable examplepath' :\\users\\osou- \\pycharmprojects\\myfirstpythonprogram\\aseem txtdays_file open (path,' 'print(days_file read()print("+++++++++++++++++++++++++"print(days_file readline()print("+++++++++++++++++++++++++"print(days_file readlines()days_file close(outputaseem kumar patel odisha state open university sambalpurodisha ++++++++++++++++++++++++++++++++++++++++++++++++[writing file writing to text file is similar to reading from the file when opening the file two choices are availableeither to append or to truncate the file appending to the file leaves any content already within the file untouched while truncating the file removes any content already within the file important to noteif new_days txt already existed before opening the file its old contents would have been destroyedso be careful when using the 'wmode syntaxfile object write(dataexamplepath' :\\myfirstpythonprogram\\aseem txtdays="hello worlddays_file open (path,' 'print(days_file write(days)days_file open (path,' 'print(days_file read()days_file close(page