Keo Sophon wrote:
> Hi all,
> 
> i am new to programming language and python. I wonder how to get a line text 
> from input file.

The simplest Python idiom to do something with each line of a file is this:
   for line in open('somefile.txt'):
     # do something with line

You can find out more here:
http://docs.python.org/tut/node9.html#SECTION009200000000000000000

Kent

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

Reply via email to