[Tutor] read() question

Ertl, John john.ertl at fnmoc.navy.mil
Wed May 11 19:25:22 CEST 2005


John,

The 'r' is the mode and is used to indicate you are reading the file.  You
could also use 'w' for only writing.  See the attached link for more.  

http://www.python.org/doc/current/tut/node9.html#SECTION00920000000000000000
0 

John
-----Original Message-----
From: John Carmona [mailto:jeannot18 at hotmail.com]
Sent: Wednesday, May 11, 2005 09:51
To: tutor at python.org
Subject: [Tutor] read() question

MyText = open('The_text.txt','r').read()

In the above line could someone tell me what the 'r' stand for. Many thanks

JC


_______________________________________________
Tutor maillist  -  Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor


More information about the Tutor mailing list