Python String Tutorials

In this second part of a three-part series that introduces you to Python, you'll learn about the importance of strings, how they work, and why Python uses three different kinds of quote marks. It is excerpted from the book Beginning Python: Using Python 2.6 and Python 3.1,, written by James Payne,

Python provides the useful ability to embed comments inside functions that are accessible from a Python shell. These are known as docstrings. A docstring provides the ability to embed not only information, but also code samples that are runnable.In this article, we will explore different ways to use doctest to develop documentation.
In this article by Greg Lee Turnquist, author of Python Testing Cookbook, we will cover:
•Documenting the basics
•Catching stack traces
•Running doctests from the command line
•Printing out all your documentation including a status report

The breaking of backwards compatibility will mean supporting two different versions in parallel. This article covers changes to input/output (I/O), the new bytes data type, changes to strings and string formatting, and finally, changes to the built-in dict type.