Syntax: file_object = open(file.name, mode) +: means “reading” or “writing” and it is employed with w, r, or a.If the file already exists, it will overwrite it. w+: opens a file to write (creates a file if.w: opens a file to write or it creates a file if the file hasn’t already been created.wb+: opens a file to read and write down in binary format.wb: opens a file to write in binary format.a+: will be used if we want to read data from the file or append data into the file.a: opens a file and allows us to append data at the end of it.rb: opens a file in binary format for the sole purpose of reading it.r+: used if we want to read the information/data or write the information/data.
0 Comments
Leave a Reply. |