pythonfilevariablesimport

Importing variables from another file?


How can I import variables from one file to another?

example: file1 has the variables x1 and x2 how to pass them to file2?

How can I import all of the variables from one to another?


Solution

  • from file1 import *  
    

    will import all objects and methods in file1