for sizefilename in sorted(data)names data[(sizefilename)if len(names print("{filename({sizebytesmay be duplicated "({ files):format(len(names)**locals())for name in namesprint("\ { }format(name)because the dictionary keys are (sizefilenametupleswe don' need to use key function to get the data sorted in size order if any (sizefilenametuple has more than one filename in its listthese might be duplicates shell dll ( bytesmay be duplicated ( files)\windows\system \shell dll \windows\system \dllcache\shell dll this is the last item taken from the lines of output produced by running finddup py \windows on windows xp system networking and internet programming |packages and modules for networking and internet programming are major part of python' standard library at the lowest levelthe socket module provides the most fundamental network functionalitywith functions for creating socketsdoing dns (domain name systemlookupsand handling ip (internet protocoladdresses encrypted and authenticated sockets can be set up using the ssl module the socketserver module provides tcp (transmission control protocoland udp (user datagram protocolservers these servers can handle requests directlyor can create separate process (by forkingor separate thread to handle each request asynchronous client and server socket handling can be achieved using the asyncore module and the higher-level asynchat module that is built on top of it python has defined the wsgi (web server gateway interfaceto provide standard interface between web servers and web applications written in python in support of the standard the wsgiref package provides reference implementation of wsgi that has modules for providing wsgi-compliant http serversand for handling response header and cgi (common gateway interfacescripts in additionthe http server module provides an http server which can be given request handler ( standard one is provided)to run cgi scripts the http cookies and http cookiejar modules provide functions for managing cookiesand cgi script support is provided by the cgi and cgitb modules