I ran below code in python shell and from a python file, I expected the same output but ironically i get NameError: name '_' is not defined
error in python file.
>>> 10+2
12
>>> print(_)
12
So i started wondering why python shell stores last expression in _
variable but it is not even defined in python file.