[Tutor] how to read from a txt file

Alan Gauld alan.gauld at freenet.co.uk
Mon Feb 14 01:19:09 CET 2005


> ei guys, chill out!

Its OK, we often get carried away on flights of fancy here :-)

> what if i choose to numbered my data from 1-96 for example. how
would
> i be able to exclude the numbered part from the data part?

You can use the string split() method to get a list of the
components. Then select the bit you want by indexing the list.

> and, mind if I ask, what's a YAGNI by the way?

Its from the XP programming camp - You Aren't Going to Need It
Basically don't build in fancy features unless you know you need
them, coz most often you won't...

It works up to a point, but if you know you *will* need them
its a lot easier to build the structure up front than to try
to bolt it on later!

Alan G.



More information about the Tutor mailing list