Let's say I have a simple python script math_ops.py
as follows:
a = 5
b = 4
c = 7
d = a + b
e = b - c
print(d)
I run this script in the Ubuntu terminal as $ python math_ops.py
, which prints the value of variable d
as 9
. Can I somehow get the value of variable e
without rerunning the script? It is easy to get the variable values in IDE in such a scenario, but how to retrieve the variables in the terminal?