> If you really want a hack, here it is: > > while 1:print > ''.join(__import__('random').choice(__import__('string').letters+'1234567890') > for x in xrange(8)),;n=raw_input() > > This is a one-liner (though mail transmission may split it up), no > import statements. If someone can come up with an even smaller version, > feel free to post. :)
while 1:i=__import__;print''.join(i('random').choice(i('string').letters +'1234567890')for x in range(8)),;raw_input() same but shorter: i = __import__; xrange -> range (why use xrange? range is faster and simpler for small ranges) n =(not needed) -- http://mail.python.org/mailman/listinfo/python-list