Writing one-liners in Python (was: Re: [Tutor] help mee)

Sean 'Shaleh' Perry shalehperry@attbi.com
Wed, 01 May 2002 22:29:52 -0700 (PDT)


> 
>       As a result, I don't know how one would convert to a
>       one-liner, say, something along the lines of the following
>       code:
> 

in shell scripts you could employ cat and HERE documents to send the code in. 
Usually though anything that begins life as a one liner quickly becomes a real
script.

Also there is a bit of "use the right tool for the right job".  python is not
quick and dirty.  I usually use awk/sed when I need that and sometimes I dig
deep into my psyche and use perl.