tion for output formatting and manipulation the module also supports objects that are timezone aware dates are easily constructed and formatted from datetime import date now date today(now datetime date( now strftime("% -% -% % % % is % on the % day of % " dec is tuesday on the day of december dates support calendar arithmetic birthday date( age now birthday age days data compression common data archiving and compression formats are directly supported by modules includingzlibgzipbz lzmazipfile and tarfile import zlib 'witch which has which witches wrist watchlen( zlib compress(slen( zlib decompress(tb'witch which has which witches wrist watchzlib crc ( performance measurement some python users develop deep interest in knowing the relative performance of different approaches to the same problem python provides measurement tool that answers those questions immediately for exampleit may be tempting to use the tuple packing and unpacking feature instead of the traditional approach to swapping arguments the timeit module quickly demonstrates modest performance advantagefrom timeit import timer timer(' =aa=bb= '' = = 'timeit( timer(' , , '' = = 'timeit( in contrast to timeit' fine level of granularitythe profile and pstats modules provide tools for identifying time critical sections in larger blocks of code brief tour of the standard library