Python Cookbook
Alex Martelli, David Ascher
Oreily
The  Python Cookbook  is a collection of problems, solutions, and practical examples for Python programmers, written by Python programmers.  The recipes range from simple tasks, such as working with dictionaries and list comprehensions, to entire modules that demonstrate templating systems and network monitoring.  The book contains over two hundred recipes for searching and sorting, text manipulation, working with files, threads, and databases, object oriented programming, XML processing, network programming, system administration, and much more.    This book is a treasure trove of useful code for all Python programmers, from novices to advanced practitioners, with contributions from such Python luminaries as Guido Van Rossum, David Ascher, Tim Peters, Paul Prescod, Mark Hammond, and Alex Martelli, as well as over one hundred other Python programmers. The recipes highlight Python best practices and can be used directly in day-to-day programming tasks, as a source of ideas, or as a way to learn more about Python.