O'Reilly logo

Python Programming On Win32 by Mark Hammond, Andy Robinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

module string: Common String Operations

This module defines some constants that can check character classes, and some useful string functions. See the module re for string functions based on regular expressions. The constants defined in this module are:

digits

The string '0123456789‘.

hexdigits

The string '0123456789abcdefABCDEF'.

letters

The concatenation of the strings lowercase() and uppercase() (check their entries in this list).

lowercase

A string containing all characters considered lowercase letters. On most systems this is the string 'abcdefghijklmnopqrstuvwxyz'. Don’t change its definition: the effect on the routines upper() and swapcase() is undefined.

octdigits

The string '01234567'.

uppercase

A string containing all characters considered uppercase letters. On most systems this is the string 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'. Don’t change its definition: the effect on the routines lower() and swapcase() is undefined.

whitespace

A string containing all characters that are considered whitespace. On most systems this includes the characters space, tab, linefeed, return, formfeed, and vertical tab. Don’t change its definition: the effect on the routines strip() and split() is undefined.

The functions defined in this module are:

atof( s )

Converts a string to a floating-point number. The string must have the standard syntax for a floating-point literal in Python, optionally preceded by a sign (+ or -). Note that this behaves identically to the built-in function float() when passed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required