open(filenam[, mode]) – om een bestand te openen. Standaard wordt een bestand geopend om te lezen. Mogelijke modes zijn er:
"r" Open for reading
"w" Open for writing (truncating to zero length)
"a" Open for append
"r+" Open for read/write (updates)
"w+" Open for read/write (with truncation to zero length)
A ’b’ may be appended to the mode to indicate binary data.
This is required for portability to Windows.
"+" modes allow random-access updates to the file.
Add A Comment
You must be logged in to post a comment.
