Asif Iqbal wrote: >On Fri, Jun 17, 2005 at 07:41:17AM, Chad Crabtree wrote: > > >>How about this. >> >>> from random import choice >> >>> alist=[choice(range(100)) for x in range(1000)] #just making a >> >> > >How do I do this in python? > alist < /tmp/logfile > >The logfile has the list of entries. > > > ok sorry filehandle=open('/tmp/logfile','r').readlines()
Look here http://docs.python.org/lib/built-in-funcs.html#built-in-funcs and http://docs.python.org/lib/bltin-file-objects.html __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor