scopes introduced basic function definitions and calls as we sawpython' core function model is simple to usebut even simple function examples quickly led us to questions about the meaning of variables in our code this moves on to present the details behind python' scopes--the places where variables are defined and looked up like module filesscopes help prevent name clashes across your program' codenames defined in one program unit don' interfere with names in another as we'll seethe place where name is assigned in our code is crucial to determining what the name means we'll also find that scope usage can have major impact on program maintenance effortoveruse of globalsfor exampleis generally bad thing on the plus sidewe'll learn that scopes can provide way to retain state information between function callsand offer an alternative to classes in some roles python scope basics now that you're ready to start writing your own functionswe need to get more formal about what names mean in python when you use name in programpython createschangesor looks up the name in what is known as namespace-- place where names live when we talk about the search for name' value in relation to codethe term scope refers to namespacethat isthe location of name' assignment in your source code determines the scope of the name' visibility to your code just about everything related to namesincluding scope classificationhappens at assignment time in python as we've seennames in python spring into existence when they are first assigned valuesand they must be assigned before they are used because names are not declared ahead of timepython uses the location of the assignment of name to associate it with ( bind it toa particular namespace in other wordsthe place where you assign name in your source code determines the namespace it will live inand hence its scope of visibility besides packaging code for reusefunctions add an extra namespace layer to your programs to minimize the potential for collisions among variables of the same name--by