Python from command line
You want to calculate something with Python quickly, from the command line. You might even want to use Python in a bash script to produce some result.
$ python -c "print 2*3" 6
Storing the result in a variable:
$ X=`python -c "print 2*3"` $ echo $X 6
Thanks to Tajti A. for the tip.