FileIO problem

Sybren Stuvel sybrenUSE at
Wed Aug 24 09:06:10 CEST 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))

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