3 ms·
https://en.wikipedia.org/wiki/One-liner_program#Python https://en.wikipedia.org/wiki/One-liner_program#Python You can use semi-colons instead of newlines, and
by a3n 13y ago
https://en.wikipedia.org/wiki/One-liner_program#Python https://en.wikipedia.org/wiki/One-liner_program#Python
You can use semi-colons instead of newlines, and colons don't require a newline.
python -c 'for c in "abc": print c; print c'
Imports and actual pipelines are a little more tedious, it can be done, but python isn't as straightforward as perl or shell-ish tools for pipelines.