Skip to main content Brad's PyNotes

Posts on Text

  1. String Module

    TL;DR

    The string module provides string constants, Template class for simple substitution, and advanced formatting utilities for text processing.

    Interesting!

    The string.Template class provides a safer alternative to % formatting - it prevents code injection by not allowing arbitrary expressions!