I noticed that all the modules I import are removed (I can't use them anymore without importing them again) after I run a python file in the python IDE. Here is the view of my IDE:
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> import os
>>> os
<module 'os' from 'C:\\Users\\MN\\AppData\\Local\\Programs\\Python\\Python37\\lib\\os.py'>
>>>
RESTART: C:/Users/MN/AppData/Local/Programs/Python/Python37/python file just ran.py
A python file just ran
>>> os
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
os
NameError: name 'os' is not defined
>>>
For deep view, this was in my file:
print("A python file just ran")
Why is this happening and how to make the imported modules stay in there without importing them again?