how to extract columns like awk $1 $5

Paul Rubin http
Fri Jan 7 16:49:44 EST 2005

roy at (Roy Smith) writes:
> Something along the lines of:
> words = input.split()
> print words[4], words[5]

That throws an exception if there are fewer than 6 fields, which might
or might not be what you want.

More information about the Python-list mailing list