I created a simple python script which has the following two lines:
a =2
a
When I run this script in Ubuntu terminal (by typing "python3.4 script.py"), nothing is displayed. But when I type the above two commands (or lines) in a python interpreter, the second command ('a') displays the value of the variable 'a', i.e. 2.
My question: Why does the second command ('a') behave differently when run as a part of a script as compared to when run as an individual command in the python interpreter?