TGViewer
Python: задачки и вопросы Python: задачки и вопросы @quiz_python · 6.91K subscribers
Post #3417 1.64K
docs.python.org:

If sep is not specified or is None, a different splitting algorithm is applied: runs of consecutive whitespace are regarded as a single separator, and the result will contain no empty strings at the start or end if the string has leading or trailing whitespace. Consequently, splitting an empty string or a string consisting of just whitespace with a None separator returns .

«Если sep (разделитель) не указан или равен None, применяется другой алгоритм разбиения: серии последовательных пробелов рассматриваются как один разделитель, и результат не будет содержать пустых строк в начале или конце, если строка имеет начальные или конечные пробелы. Следовательно, разбиение пустой строки или строки, состоящей только из пробелов, с разделителем None возвращает []».

Начиная с Python 3.x, в качестве разделителей также принимаются табуляция (\t) и разрыв строки (\n).
Python documentation Built-in Types The following sections describe the standard types that are built into the interpreter. The principal built-in types are numerics, sequences, mappings, classes, instances and exceptions. Some colle...
More from @quiz_python
  1. Oct 2, 2026Развёрнутое пояснение: 1. Вызов orders() создаёт объект генератора, но его тело пока не вы…
  2. Oct 2, 2026Post #4908
  3. Oct 1, 2026Развёрнутое пояснение: 1. Кортеж regions задаёт два ключа: eu и us. 2. dict.fromkeys(regio…
  4. Oct 1, 2026Post #4906
  5. Sep 30, 2026Развёрнутое пояснение: 1. defaults содержит исходные значения timeout и retries, а env изн…
  6. Sep 30, 2026Post #4904
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →