Opening the file in writing mode

Abdul Abdul abdul.sw84 at gmail.com
Thu Jan 15 12:19:43 CET 2015


Hi,

Thanks for your reply. I just wanted to understand the 'w' mode in Python.
So, when using it, it will overwrite any existing mode, right?

Thanks.

On Thu, Jan 15, 2015 at 12:13 PM, Adnan Sadzak <sadzak at gmail.com> wrote:

> Hi,
>
> Yes, but You also can open an existing file in 'append' mode.
>
> Cheers,
> Adnan
> On Jan 15, 2015 12:08 PM, "Abdul Abdul" <abdul.sw84 at gmail.com> wrote:
>
>> Hello,
>>
>> In the Python documentation, when opening the file in write mode, it
>> mentions the following:
>>
>> *writing (truncating the file if it already exists)*
>> What is meant by "truncating" here? Is it simply overwriting the file
>> already existing?
>>
>> Thanks.
>>
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150115/93aa501b/attachment.html>


More information about the Python-list mailing list