On 2007-09-04, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Thanks guys. Changing to how Python does things has a lot of geting > used to!
That's part of the fun :-) > Do any of you have any ideas on the best way to do the following > problem: > > Each loop I perform, I get a new list of Strings. > I then want to print these lists as columns adjacent to each other > starting with the first > created list in the first column and last created list in the final > column. Use zip: >>> x = ['1', '2'] >>> y = ['3', '4'] >>> for row in zip(x,y): ... print ', '.join(row) ... 1, 3 2, 4 zip() constructs a list of rows, like [('1', '3'), ('2', '4')] which is then quite easy to print Good luck, Albert -- http://mail.python.org/mailman/listinfo/python-list