+ 1
read and write file is ok, but does write command also creates the file if not present?
i am in the middle of read and write file portion, question came up to my mind ?
2 ответов
+ 3
but keep in mind if you want to add something to a file using file mode 'a'
In this case the file must exist.
+ 2
open in mode 'w' uses the file if it is present and creates it if it is not.