Index — Python 3.15.2 documentation
Symbols · in a command interpreter · in curses module · in formatted string literal · in glob-style wildcards, [1] · in string formatting · in struct format strings.
Symbols · in a command interpreter · in curses module · in formatted string literal · in glob-style wildcards, [1] · in string formatting · in struct format strings.
(exclamation mark). in formatted string literal ! (pdb command) ! (エクスクラメーション). curses モジュール内 · glob 形式のワイルドカード, [1] ...
Lexicographical ordering for strings uses the Unicode code point number to order individual characters. Some examples of comparisons between sequences of the same type
The Python standard library ». Functional Programming Modules ». itertools — Functions creating iterators for efficient looping.raise ValueError('n must be at least one') iterator = iter(iterable) while batch := tuple(islice(iterator, n)): if strict and len(batch) != n
1 day ago · What's new in Python 3.15? Or all "What's new" documents since Python 2.0 Tutorial Start here: a tour of Python's syntax and features Built-ins reference Built-in functions and classes Library reference Standard library modules Language reference Syntax and language elements Python setup and usage How to install, configure, and use Python Python HOWTOs In-depth topic manuals Installing Python ...
Source code: Lib/csv.py The so-called CSV (Comma Separated Values) format is the most common import and export format for spreadsheets and databases.
1 day ago · Loop over the format_string and return an iterable of tuples (literal_text, field_name, format_spec, conversion). This is used by vformat () to break the string into either literal text, or replacement fields.
1 day ago · The string type has some methods that perform useful operations for padding strings to a given column width. When you don’t need fancy output but just want a quick display of some variables for debugging purposes, you can convert any value to a string with the repr () or str () functions.
Simple example: A descriptor that returns a constant. Dynamic lookups. Managed attributes. Customized names. Closing thoughts. Complete Practical Example. Validator class.
1 day 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.
3 days ago · 2. Lexical analysis ¶ A Python program is read by a parser. Input to the parser is a stream of tokens, generated by the lexical analyzer (also known as the tokenizer). This chapter describes how the lexical analyzer produces these tokens. The lexical analyzer determines the program text’s encoding (UTF-8 by default), and decodes the text into source characters. If the text cannot be decoded ...