[Tutor] how to sort a tab delim file

vince spicer vinces1979 at gmail.com
Wed Jan 13 16:25:55 CET 2010


On Wed, Jan 13, 2010 at 9:21 AM, Hs Hs <ilhs_hs at yahoo.com> wrote:

> Hi:
>
> I have a tab-delim file:
>
> col1         col2     col3
> andrew    1987   1990
> jake         1974   1980
> jim           1964   1970
> lance        1984   1992
>
>
> how can I sort column 2 and get :
> jim           1964   1970
> jake         1974   1980
> lance        1984   1992
> andrew    1987   1990
>
>
> I know how to sort a items in one list. but I cannot get how this can be
> done on a file.
>
> any suggestions. thanks!
> Hs
>
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>
http://diveintopython.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100113/ec34b14a/attachment.htm>


More information about the Tutor mailing list