strings.md
1> **Источник:** https://python-all.ru/3.0/library/strings.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# Строковые сервисы89The modules described in this chapter provide a wide range of string manipulation operations.1011В дополнение, встроенные строковые классы Python поддерживают методы последовательностей, описанные в разделе [*Типы последовательностей – str, bytes, bytearray, list, tuple, range*](https://python-all.ru/3.0/library/stdtypes.html#typesseq), а также строковые методы, описанные в разделе [*Строковые методы*](https://python-all.ru/3.0/library/stdtypes.html#string-methods). Для форматирования строк см. раздел [*Форматирование строк*](https://python-all.ru/3.0/library/string.html#string-formatting). Также см. модуль [`re`](https://python-all.ru/3.0/library/re.html#module-re) для строковых функций, основанных на регулярных выражениях.1213- [`string` – Общие операции со строками](https://python-all.ru/3.0/library/string.html)1415 - [Строковые константы](https://python-all.ru/3.0/library/string.html#string-constants)16 - [Форматирование строк](https://python-all.ru/3.0/library/string.html#id1)17 - [Синтаксис строки форматирования](https://python-all.ru/3.0/library/string.html#format-string-syntax)1819 - [Мини-язык спецификации формата](https://python-all.ru/3.0/library/string.html#format-specification-mini-language)20 - [Строки-шаблоны](https://python-all.ru/3.0/library/string.html#id3)21 - [Строковые функции](https://python-all.ru/3.0/library/string.html#string-functions)22- [`re` – Операции с регулярными выражениями](https://python-all.ru/3.0/library/re.html)2324 - [Синтаксис регулярных выражений](https://python-all.ru/3.0/library/re.html#regular-expression-syntax)25 - [Сопоставление и поиск](https://python-all.ru/3.0/library/re.html#matching-vs-searching)26 - [Содержимое модуля](https://python-all.ru/3.0/library/re.html#module-contents)27 - [Объекты регулярных выражений](https://python-all.ru/3.0/library/re.html#regular-expression-objects)28 - [Объекты Match](https://python-all.ru/3.0/library/re.html#id1)29 - [Примеры](https://python-all.ru/3.0/library/re.html#examples)3031 - [Проверка наличия пары](https://python-all.ru/3.0/library/re.html#checking-for-a-pair)32 - [Имитация scanf()](https://python-all.ru/3.0/library/re.html#simulating-scanf)33 - [Избегание рекурсии](https://python-all.ru/3.0/library/re.html#avoiding-recursion)34 - [search() и match()](https://python-all.ru/3.0/library/re.html#search-vs-match)35 - [Создание телефонного справочника](https://python-all.ru/3.0/library/re.html#making-a-phonebook)36 - [Преобразование текста](https://python-all.ru/3.0/library/re.html#text-munging)37 - [Поиск всех наречий](https://python-all.ru/3.0/library/re.html#finding-all-adverbs)38 - [Поиск всех наречий и их позиций](https://python-all.ru/3.0/library/re.html#finding-all-adverbs-and-their-positions)39 - [Сырая строковая нотация](https://python-all.ru/3.0/library/re.html#raw-string-notation)40- [`struct` – Интерпретирует байты как упакованные двоичные данные](https://python-all.ru/3.0/library/struct.html)4142 - [Объекты struct](https://python-all.ru/3.0/library/struct.html#id1)43- [`difflib` – Вспомогательные функции для вычисления различий](https://python-all.ru/3.0/library/difflib.html)4445 - [Объекты SequenceMatcher](https://python-all.ru/3.0/library/difflib.html#sequencematcher-objects)46 - [Примеры SequenceMatcher](https://python-all.ru/3.0/library/difflib.html#id1)47 - [Объекты Differ](https://python-all.ru/3.0/library/difflib.html#id2)48 - [Пример Differ](https://python-all.ru/3.0/library/difflib.html#differ-example)49 - [Интерфейс командной строки для difflib](https://python-all.ru/3.0/library/difflib.html#a-command-line-interface-to-difflib)50- [`textwrap` – Перенос и заполнение текста](https://python-all.ru/3.0/library/textwrap.html)51- [`codecs` – Реестр кодеков и базовые классы](https://python-all.ru/3.0/library/codecs.html)5253 - [Базовые классы кодеков](https://python-all.ru/3.0/library/codecs.html#id1)5455 - [Объекты Codec](https://python-all.ru/3.0/library/codecs.html#id2)56 - [Объекты IncrementalEncoder](https://python-all.ru/3.0/library/codecs.html#incrementalencoder-objects)57 - [Объекты IncrementalDecoder](https://python-all.ru/3.0/library/codecs.html#incrementaldecoder-objects)58 - [Объекты StreamWriter](https://python-all.ru/3.0/library/codecs.html#streamwriter-objects)59 - [Объекты StreamReader](https://python-all.ru/3.0/library/codecs.html#streamreader-objects)60 - [Объекты StreamReaderWriter](https://python-all.ru/3.0/library/codecs.html#streamreaderwriter-objects)61 - [Объекты StreamRecoder](https://python-all.ru/3.0/library/codecs.html#streamrecoder-objects)62 - [Кодировки и Юникод](https://python-all.ru/3.0/library/codecs.html#encodings-and-unicode)63 - [Стандартные кодировки](https://python-all.ru/3.0/library/codecs.html#id3)64 - [`encodings.idna` – Интернационализированные доменные имена в приложениях](https://python-all.ru/3.0/library/codecs.html#module-encodings.idna)65 - [`encodings.utf_8_sig` – Кодек UTF-8 с сигнатурой BOM](https://python-all.ru/3.0/library/codecs.html#module-encodings.utf_8_sig)66- [`unicodedata` – База данных Unicode](https://python-all.ru/3.0/library/unicodedata.html)67- [`stringprep` – Подготовка строк для интернета](https://python-all.ru/3.0/library/stringprep.html)68