sscasc@tumkur providing they meet the regular expression' requirements regular expressions (which we will mostly call "regexesfrom now onare defined using mini-language that is completely different from python--but python includes the re module through which we can seamlessly create and use regexes regexes are used for five main purposesparsingidentifying and extracting pieces of text that match certain criteria--regexes are used for creating ad hoc parsers and also by traditional parsing tools searchinglocating substrings that can have more than one formfor examplefinding any of "pet png""pet jpg""pet jpeg"or "pet svgwhile avoiding "carpet pngand similar searching and replacingreplacing everywhere the regex matches with stringfor examplefinding "bicycleor "human powered vehicleand replacing either with "bikesplitting stringssplitting string at each place the regex matchesfor examplesplitting everywhere colon-space or equals ("or "="occurs validationchecking whether piece of text meets some criteriafor examplecontains currency symbol followed by digits the python package python modules are single filewhereas python package is collection of modules package is directory that contains python modules package is module that contains other modules some or all of the modules in package may be sub packagesresulting in hierarchical tree-like structure namespace is mapping from names to objects examples are the set of built-in names (containing functions that are always accessible for free in any python program)the global names in moduleand the local names in function even the set of attributes of an object can be considered namespace the namespaces allow defining and organizing names with claritywithout overlapping or interference for examplethe namespace associated with that book we were looking for in the library can be used to import the book itselflike thisfrom library second_floor section_x row_three import book we start from the library namespaceand by means of the dot operatorwe navigate that namespace within this namespacewe look for second_floorand again we navigate with dotoperator we then walk into section_xand finally within the last namespacerow_threewe find the name we were looking forbook ****sp_python programming