Skip to content
murmot

Results for “python split string example code pdf script site:docs.python.org 2”

  • docs.python.org

    Built-in Types — Python 3.12.16 documentation

    Textual data in Python is handled with str objects, or strings. Strings are immutable sequences of Unicode code points. String literals are written in a variety of ways: Single quotes: 'allows embedded "double" quotes'.

  • docs.python.org

    string — Common string operations — Python 3.15.2 documentation

    | string — Common string operations¶. Source code: Lib/string/__init__.py. See also. Text Sequence Type — str.For example, '%03.2f' can be translated to '{:03.2f}'. The new format syntax also supports new and different options, shown in the following examples.

  • docs.python.org

    Regular expression HOWTO — Python 3.15.2 documentation

    1 day ago · Regular expression HOWTO ¶ Abstract This document is an introductory tutorial to using regular expressions in Python with the re module. It provides a gentler introduction than the corresponding section in the Library Reference. Introduction ¶ Regular expressions (called REs, or regexes, or regex patterns) are essentially a tiny, highly specialized programming language embedded inside Python ...

  • docs.python.org

    shlex — Simple lexical analysis — Python 3.15.2 documentation

    This will often be useful for writing minilanguages, (for example, in run control files for Python applications) or for parsing quoted strings. The shlex module defines the following functions: shlex.split(s, comments=False, posix=True)¶. Split the string s using shell-like syntax.

  • docs.python.org

    Text Processing Services — Python 3.15.2 documentation

    16 hours ago · Text Processing Services ¶ The modules described in this chapter provide a wide range of string manipulation operations and other text processing services. The codecs module described under Binary Data Services is also highly relevant to text processing. In addition, see the documentation for Python’s built-in string type in Text Sequence Type — str.

  • docs.python.org

    doctest — Test interactive Python examples — Python...

    Functions that convert doctests to Python code, and possibly run the synthesized code under the debugger: doctest.script_from_examples(s)¶. Convert text with examples to a script. Argument s is a string containing doctest examples.

  • docs.python.org

    textwrap — Text wrapping and filling — Python 3.15.2 ...

    16 hours ago · Source code: Lib/textwrap.py The textwrap module provides some convenience functions, as well as TextWrapper, the class that does all the work. If you’re just wrapping or filling one or two text strings, the convenience functions should be good enough; otherwise, you should use an instance of TextWrapper for efficiency.

  • docs.python.org

    os.path — Common pathname manipulations — Python 3.15.2 ...

    1 day ago · This module implements some useful functions on pathnames. To read or write files see open (), and for accessing the filesystem see the os module. The path parameters can be passed as strings, or bytes, or any object implementing the os.PathLike protocol. Unlike a Unix shell, Python does not do any automatic path expansions. Functions such as expanduser () and expandvars () can be invoked ...