>>> [(i,j) for i in range(4, 5+1) for j in range(7, 9+1)] [(4, 7), (4, 8), (4, 9), (5, 7), (5, 8), (5, 9)]
On Mon, Feb 22, 2010 at 9:33 PM, Jojo Mwebaze <jojo.mweb...@gmail.com>wrote: > sorry guys, i found a solution, ignore the post > > cheers > > Johnson > > > On Mon, Feb 22, 2010 at 4:57 PM, Jojo Mwebaze <jojo.mweb...@gmail.com>wrote: > >> Hello There, >> >> I got two pairs of coordinates say (4,5) and (7,9) from these two pairs i >> would like to generate two lists >> >> [4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7] >> >> and >> >> [5, 6, 7, 8, 9, 5, 6, 7, 8, 9, 5, 6, 7, 8, 9, 5, 6, 7, 8, 9] >> >> i am actually generating all coordinates that fall within (4,5) and (7,9) >> >> Any help >> >> cheers >> >> Johnson >> >> >> > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor