Front cover image for Python Cookbook

Python Cookbook

Like its predecessor, the new edition offers a collection of solutions to problems that Python programmers face everyday. Updated for Python 2.4, it now includes over 200 recipes that range from simple tasks, such as working with dictionaries and list comprehensions, to complex tasks, such as monitoring a network and building a templating system
eBook, English, 2008
O'Reilly Media, Inc., Sebastopol, 2008
1 online resource (848 pages)
9780596554743, 0596554745
609840674
Python Cookbook, 2nd Edition; The Implementation of the Book; Using the Code from This Book; Audience; Organization; Further Reading; Conventions Used in This Book; How to Contact Us; Safari® Enabled; Acknowledgments; Alex Martelli; Anna Martelli Ravenscroft; 1. Text; Basic Textual Operations; Sources of Text; String Basics; 1.1. Processing a String One Character at a Time; Solution; Discussion; See Also; 1.2. Converting Between Characters and Numeric Codes; Solution; Discussion; See Also; 1.3. Testing Whether an Object Is String-like; Solution; Discussion; See Also; 1.4. Aligning Strings. SolutionDiscussion; See Also; 1.5. Trimming Space from the Ends of a String; Solution; Discussion; See Also; 1.6. Combining Strings; Solution; Discussion; See Also; 1.7. Reversing a String by Words or Characters; Solution; Discussion; See Also; 1.8. Checking Whether a String Contains a Set of Characters; Solution; Discussion; See Also; 1.9. Simplifying Usage of Strings & translate Method; Solution; Discussion; See Also; 1.10. Filtering a String for