[Tutor] Odd problem

Alan Gauld alan.gauld at blueyonder.co.uk
Sun May 23 18:20:27 EDT 2004


> I cannot find anything in the Python documentation about how to 
> read integers from a text file into a list. I assume there is a 
> logical opposite to str() but have not seen it as yet. 

Yes, try int() :-)

Really, it is that simple...

The >>> prompt is a great place to try out ideas, in Python, often 
the intuitive approach just works, it's always worth a try...

Alan G.



More information about the Tutor mailing list