Subscribe
Tutorial search

Python String Tutorials


Sort by:
Python 3.1 String and Quotes
Python 3.1 String and Quotes
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,
Difficulty:
Python: Using doctest for Documentation
Python: Using doctest for Documentation
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
Difficulty:
Python String Formatting
Python String Formatting
Python supports formatting of Strings. It has potential to use high complex level formatting. In this tutorial I am using simple formatting of Python Strings.
Difficulty:
Python 3 changes breaks backwards compatibility
Python 3 changes breaks backwards compatibility
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.
Difficulty:
Search Term(s) (1): string