[Tutor] clearing a text document

max baseman dos.fool at gmail.com
Thu Aug 30 06:33:00 CEST 2007

right it's for a quick math "game" the rules are simple you start  
with any number to get the next number you, a. if it's odd multiply  
by 3 than add 1 or b. if it's even divide by two,  the point of this  
is to see how long it takes to get to one are it starts to repeat  
now im looking for a a number with  a very high amount of numbers  
till you get to 1 so every time it's finds a new one i would like it  
to write that to a file and clear the last entry,

On Aug 29, 2007, at 5:45 PM, Alan Gauld wrote:

> "max baseman" <dos.fool at gmail.com> wrote
>> quick question how would i clear a text document?
> A bit of context? If its a file you just open the file for writing.
> If its a list of strings in memory
> text = []
> will clear it...
> If its a GUI text widget it will depend on which framework you are
> using.
> Alan G
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

More information about the Tutor mailing list