Creating a File

Oleg Broytmann phd at phd.russ.ru
Mon Oct 18 08:03:52 EDT 1999


On Mon, 18 Oct 1999, Gordon Williams wrote:
> I have been looking through the docs for an answer to this simple question.
>  How do I create a new file??

   Using builtin function "open".

file = open('file.txt', 'w')

   Read docs on builtin functions.

Oleg.
---- 
    Oleg Broytmann      Foundation for Effective Policies      phd at phd.russ.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list