six modules if you quit from the python interpreter and enter it againthe definitions you have made (functions and variablesare lost thereforeif you want to write somewhat longer programyou are better off using text editor to prepare the input for the interpreter and running it with that file as input instead this is known as creating script as your program gets longeryou may want to split it into several files for easier maintenance you may also want to use handy function that you've written in several programs without copying its definition into each program to support thispython has way to put definitions in file and use them in script or in an interactive instance of the interpreter such file is called moduledefinitions from module can be imported into other modules or into the main module (the collection of variables that you have access to in script executed at the top level and in calculator modea module is file containing python definitions and statements the file name is the module name with the suffix py appended within modulethe module' name (as stringis available as the value of the global variable __name__ for instanceuse your favorite text editor to create file called fibo py in the current directory with the following contentsfibonacci numbers module def fib( )write fibonacci series up to ab while nprint(aend='ab ba+ print(def fib ( )return fibonacci series up to result [ab while nresult append(aab ba+ return result now enter the python interpreter and import this module with the following commandimport fibo this does not enter the names of the functions defined in fibo directly in the current symbol tableit only enters the module name fibo there using the module name you can access the functionsfibo fib( fibo fib ( (continues on next page