Python text Page

Python Text



Return to Text


"The Python str class is the most obvious Python text processing tool available to Python programmers, but there are plenty of other Python tools in the Python standard library to make advanced Python text manipulation simple." (B072QZZDV7)


"Python programs may use Python string.Template as a simple way to Python parameterize strings beyond the features of Python str objects. While not as Python feature-rich as Python templates defined by many of the Python web frameworks or Python extension modules available from the Python Package Index, string.Template is a good middle ground for Python user-modifiable templates in which Python dynamic values need to be inserted into otherwise Python static text." (B072QZZDV7)

"The Python textwrap (page 7) module includes Python tools for Python formatting text from paragraphs by limiting the width of output, adding Python indentation, and inserting Python line breaks to Python wrap lines consistently." (B072QZZDV7)

"The Python standard library includes two Python modules for Python comparing text values that go beyond the Python built-in equality and Python sort comparison supported by Python string objects. Python re (page 13) provides a complete Python regular expression library, implemented in C language for speed. Python Regular expressions are well suited for finding substrings within a larger Python data set, Python comparing strings against a pattern more complex than another Python fixed string, and mild Python parsing." (B072QZZDV7)

"Python difflib (page 58), in contrast, computes the actual differences between sequences of text in terms of the parts added, removed, or changed. The output of the Python comparison functions in difflib can be used to provide more detailed feedback to the user about where changes occur in two Python inputs, how a document has changed over time, and so on." (B072QZZDV7)


Fair Use Source: B072QZZDV7


=Python Text Topics

=

* 1.1 Python string - Text Constants and Templates
* 1.1.1 Python Functions
* 1.1.2 Python Templates
* 1.1.3 Python Advanced Templates
* 1.1.4 Python Formatter
* 1.1.5 Python Constants
* 1.2 Python textwrap - Formatting Text Paragraphs
* 1.2.1 Python Example Data
* 1.2.2 Python Filling Paragraphs
* 1.2.3 Python Removing Existing Indentation
* 1.2.4 Python Combining Dedent and Fill
* 1.2.5 Python Indenting Blocks
* 1.2.6 Python Hanging Indents
* 1.2.7 Python Truncating Long Text
* 1.3 Python re - Regular Expressions
* 1.3.1 Python Finding Patterns in Text
* 1.3.2 Python Compiling Expressions
* 1.3.3 Python Multiple Matches
* 1.3.4 Python Pattern Syntax
* 1.3.5 Python Constraining the Search
* 1.3.6 Python Dissecting Matches with Groups
* 1.3.7 Python Search Options
* 1.3.8 Python Looking Ahead or Behind
* 1.3.9 Python Self-referencing Expressions
* 1.3.10 Python Modifying Strings with Patterns
* 1.3.11 Python Splitting with Patterns
* 1.4 Python difflib - Compare Sequences
* 1.4.1 Python Comparing Bodies of Text
* 1.4.2 Python Junk Data
* 1.4.3 Python Comparing Arbitrary Types




Fair Use Sources


* Fair Use Source: B072QZZDV7