Importing other files.py

python

#1

Can it be made possible in PYTHON to import data from another .py file? for e.g., I created a dictionary in one file called a.py and I want to use that same dictionary in another .py file without having to type the dictionary back in. Is this possible?


#2

Yes, you can. If you want to use file named "file.py", just use

import file

You can read more here.