point in this book the variables our code defined by assignment--aband --show up last in the dir result modules and namespaces module imports are way to run files of codebutas we'll expand on later in the bookmodules are also the largest program structure in python programsand one of the first key concepts in the language as we've seenpython programs are composed of multiple module files linked together by import statementsand each module file is package of variables--that isa namespace just as importantlyeach module is self-contained namespaceone module file cannot see the names defined in another file unless it explicitly imports that other file because of thismodules serve to minimize name collisions in your code--because each file is self-contained namespacethe names in one file cannot clash with those in anothereven if they are spelled the same way in factas you'll seemodules are one of handful of ways that python goes to great lengths to package your variables into compartments to avoid name clashes we'll discuss modules and other namespace constructs--including local scopes defined by classes and functions--further later in the book for nowmodules will come in handy as way to run your code many times without having to retype itand will prevent your file' names from accidentally replacing each other import versus fromi should point out that the from statement in sense defeats the namespace partitioning purpose of modules--because the from copies variables from one file to anotherit can cause same-named variables in the importing file to be overwrittenand won' warn you if it does this essentially collapses namespaces togetherat least in terms of the copied variables because of thissome recommend always using import instead of from won' go that farthoughnot only does from involve less typing (an asset at the interactive prompt)but its purported problem is relatively rare in practice besidesthis is something you control by listing the variables you want in the fromas long as you understand that they'll be assigned to values in the target modulethis is no more dangerous than coding assignment statements--another feature you'll probably want to useusage notesimport and reload for some reasononce people find out about running files using import and reloadmany tend to focus on this alone and forget about other launch options that always run the current version of the code ( icon clicksidle menu optionsand system command linesthis approach can quickly lead to confusionthough--you need to module imports and reloads