Python lambdas are limited to one line and can’t contain
statements (for, if, def, etc.). Which leaves me
wondering, what’s the point?
As much as I wish that the python lambda syntax was more powerful, they are ridiculously useful for one-liners where you can't use forms that require whitespace indentation. Everything must consist of set operations.
cat file | python -c "import sys; lines=sys.stdin.readlines(); lines_i_care_about = [str(l.split(',')[2]) for l in lines if l.split(',')>=3]; print '\n'.join( lines_i_care_about )
(yes you could do this example in awk or sed, but that's not the point)