File opening modes (r, w, a ...)

jfong at ms4.hinet.net jfong at ms4.hinet.net
Thu Feb 22 20:28:06 EST 2018


ast於 2018年2月22日星期四 UTC+8下午8時33分00秒寫道:
> Hello
> 
> I share a very valuable table I found on
> StackOverflow about file opening modes
> 
> If like me you always forget the details of
> file opening mode, the following table provides
> a good summary
> 
>                    | r   r+   w   w+   a   a+
> ------------------|--------------------------
> read              | +   +        +        +
> write             |     +    +   +    +   +
> write after seek  |     +    +   +
> create            |          +   +    +   +
> truncate          |          +   +
> position at start | +   +    +   +
> position at end   |                   +   +

What the "write after seek" means?

--Jach



More information about the Python-list mailing list