[(' '' ')(' '' ')(' '' ')(' '' ')(' '' ')re findall('(( )))''abacadefagah'[('ab'' '' ')('ac'' '' ')('ad'' '' ')('ag'' '' ')('ah'' '' ')making repeated regular expressions efficient whenever you call one of the regular expression methodsthe engine has to convert the pattern string into an internal structure that makes searching strings fast this conversion takes non-trivial amount of time if regular expression pattern is going to be reused multiple times (for exampleinside for or while loop)it would be better if this conversion step could be done only once this is possible with the re compile method it returns an object-oriented version of the regular expression that has been compiled down and has the methods we've explored (matchsearchfindallalreadyamong others we'll see examples of this in the case study this has definitely been condensed introduction to regular expressions at this pointwe have good feel for the basics and will recognize when we need to do further research if we have string pattern matching problemregular expressions will almost certainly be able to solve them for us howeverwe may need to look up new syntaxes in more comprehensive coverage of the topic but now we know what to look forlet' move on to completely different topicserializing data for storage serializing objects nowadayswe take the ability to write data to file and retrieve it at an arbitrary later date for granted as convenient as this is (imagine the state of computing if we couldn' store anything!)we often find ourselves converting data we have stored in nice object or design pattern in memory into some kind of clunky text or binary format for storagetransfer over the networkor remote invocation on distant server the python pickle module is an object-oriented way to store objects directly in special storage format it essentially converts an object (and all the objects it holds as attributesinto sequence of bytes that can be stored or transported however we see fit for basic workthe pickle module has an extremely simple interface it is comprised of four basic functions for storing and loading datatwo for manipulating file-like objectsand two for manipulating bytes objects (the latter are just shortcuts to the file-like interfaceso we don' have to create bytesio file-like object ourselves