This question already has an answer here:
- IPython magic print variables on assignment 1 answer
Is there a way to make iPython automatically echo the result of an assignment statement?
For example, in MATLAB, ending an assignment statement without a semicolon prints the result of the assignment, and putting a semicolon at the end of the statement suppresses any output.
>> b=1+2
b =
3
>> b=1+2;
>>
I want to be able to do something similar in iPython. However, currently I have to use two separate statements if I want to see the assignment result:
In [32]: b=1+2
In [33]: b
Out[33]: 3