getting words from readline

Adam nospam at example.com
Sun Sep 11 01:06:44 EDT 2005


How is best to extract word strings from a 
line = infile.readline()  

I wish to quickly check the first word of 
each line of a text file. 

Indeed, How do I break a lineinput() line 
into component words (separate by spaces etc) ?

Should I be looking at; 
Re Parser Slice StringIO ? 


Any help appreciated. 







More information about the Python-list mailing list