<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Even better,</DIV>
<DIV> </DIV>
<DIV>Thank you all</DIV>
<DIV> </DIV>
<DIV>Ionut<BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">----- Original Message ----<BR>From: D'Arcy J.M. Cain <darcy@druid.net><BR>To: sandric ionut <sandricionut@yahoo.com><BR>Cc: python-list@python.org<BR>Sent: Wednesday, October 1, 2008 3:13:55 PM<BR>Subject: Re: change line with columns when print<BR><BR>On Wed, 1 Oct 2008 04:43:34 -0700 (PDT)<BR>sandric ionut <<A href="mailto:sandricionut@yahoo.com" ymailto="mailto:sandricionut@yahoo.com">sandricionut@yahoo.com</A>> wrote:<BR>> <BR>> <BR>> Hello:<BR>> I have a text file that looks like:<BR>> 0 23<BR>> 1 342<BR>> 3 31<BR>> and I want to read the file and print it out like:<BR>> 0 1 3<BR>> 23 342 31<BR>> <BR>> How can I do this?<BR><BR>Probably tons of ways.  Here's one with no input checking.<BR><BR>L = [x.strip().split() for x in open("infile") if x]<BR>for i in range(2):<BR>  print ' '.join([x[i] for x in L])<BR><BR>--
 <BR>D'Arcy J.M. Cain <<A href="mailto:darcy@druid.net" ymailto="mailto:darcy@druid.net">darcy@druid.net</A>>        |  Democracy is three wolves<BR><A href="http://www.druid.net/darcy/" target=_blank>http://www.druid.net/darcy/</A>                |  and a sheep voting on<BR>+1 416 425 1212    (DoD#0082)    (eNTP)  |  what's for dinner.<BR></DIV></DIV></div><br>

      </body></html>