I had a pretty general question. 
I'm used to programming my main code inside def main(): 
But when I made a GUI using TKinter and put it inside my main code none of my variables worked! After putting my GUI on indent 0 code the GUI finally worked, but any functions I activated using my GUI didn't have my variables! Does anyone know what to do? 
Also, if my GUI takes input values and stores them in a variable and activates a function, will that function need to have this variable passed into it? Or does it already know?
Programming on Jetbrains Pycharm in Python 3.4.
The simple fact is, GUI code is no different than any other python code. It can go wherever you want. The exact same rules apply for widgets as they do for integers and strings and anything else in a python program. Local variables are only visible locally, global variables are visible everywhere within a module, and instance variables are accessible to anything inside an object, or anything that has a reference to an object.
Where do GUI's go in a general application