FileIO problem

Sybren Stuvel sybrenUSE at YOURthirdtower.com.imagination
Wed Aug 24 03:06:10 EDT 2005


Layin'_Low enlightened us with:
> count = 0
> while count != 1000:
>     count = count + 1
>     print "Admin forceclass " , count , gclas

I think you want:

output = file('out', 'w')
gclas = raw_input("What is the class:")
for count in range(1000):
	output.write("Admin forceclass %4i %s\n" % (count , gclas))
output.close()


Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
                                             Frank Zappa



More information about the Python-list mailing list