rapid introduction to procedural programming python module is just py file that contains python codesuch as custom function and class (custom data typedefinitionsand sometimes variables to access the functionality in module we must import it for exampleimport sys to import module we use the import statement followed by the name of the py filebut omitting the extension once module has been importedwe can access any functionsclassesor variables that it contains for exampleprint(sys argvthe sys module provides the argv variable-- list whose first item is the name under which the program was invoked and whose second and subsequent items are the program' command-line arguments the two previously quoted lines constitute the entire echoargs py program if the program is invoked with the command line echoargs py -vit will print ['echoargs py''- 'on the console (on unix the first entry may be /echoargs pydot operator in generalthe syntax for using function from module is modulename functionname(argumentsit makes use of the dot ("access attribute"operator we introduced in piece # the standard library contains lots of modulesand we will make use of many of them throughout the book the standard modules all have lowercase namesso some programmers use title-case names ( mymodulefor their own modules to keep them distinct let us look at just one examplethe random module (in the standard library' random py file)which provides many useful functionsimport random random randint( random choice(["apple""banana""cherry""durian"]after these statements have been executedx will contain an integer between and inclusiveand will contain one of the strings from the list passed to the random choice(function shebang (#!line it is conventional to put all the import statements at the beginning of py filesafter the shebang lineand after the module' documentation (documenting modules is covered in we recommend importing standard library modules firstthen third-party library modulesand finally your own modules the sys modulesome other built-in modulesand modules implemented in don' necessarily have corresponding py files--but they are used in just the same way as those that do