clear content of 'printed'
chotty at freenet.de
Sun Aug 22 15:19:02 CEST 2004
I have the following problem:
I want to write a python script, that writes text into files. The text is
being "collected" in a for-loop, the code looks like this:
for i in range(len(myList)):
id = myList[i]
print "some text"
Where writeToFile() creates a new file with the id 'id' and fills it with
'printed'. The problem is, that I have to delete the
content of 'printed' before entering the for-loop again. Else, I'll find
the content of the past for-loops in my file. (The file created in the
second loop would look like this:)
Is there a possibility to do clear the content of 'printed' in python?
More information about the Python-list