Most basic: Use the latest Python 3 (or higher)
Use multiple lines in a one-liner with \n:
echo -e "import sys\nsys.exit('Error')" | python3
A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.