ahhhh, so thats the way to do it, a list comprehension, thanks for the info...
On Fri, 25 Mar 2005 14:10:41 -0500, Gabriel Farrell <[EMAIL PROTECTED]> wrote: > how about > > manyones = [ 1 for x in range(96) ] > > > On Sat, Mar 26, 2005 at 03:02:34AM +0800, jrlen balane wrote: > > basically, i'm going to create a list with 96 members but with only one > > value: > > > > list1[1,1,1,1...,1] > > > > is there a shorter way to write this one??? > > _______________________________________________ > > Tutor maillist - [email protected] > > http://mail.python.org/mailman/listinfo/tutor > _______________________________________________ > Tutor maillist - [email protected] > http://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
