Python onliners from terminal

From wikiluntti

Introduction

Use python as a simple calculator. Python is a powerful language which is easy to use.

Theory

Use -c option to use python. Note that print command is necessary. Or use echo -e option to pipe commands to Python compiler.

https://stackoverflow.com/questions/2043453/executing-multi-line-statements-in-the-one-line-command-line