[Tutor] String switch
Alan Gauld
alan.gauld at btinternet.com
Sun Oct 9 18:20:30 CEST 2011
On 09/10/11 16:27, Christopher King wrote:
> I know the method of finding every string, and inserting a swapcase in
> to the code. Does anyone now a way just to insert code at the top though?
Inserting code at the top of the file is just like inserting any kind of
text at the top of any kind of text file. Whjether the code does what
you want is another matter and whether inserting code at the top of a
file is a good way of achieving what you want is yet another.
But for an example of inserting text at the top of a file look in the
File Handling topic of my tutorial. Look at the example just above the
"OS Gotchas" box...
But I really don't think this is the best way to achieve your real
objective.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list