d15 · Split paragraphs (~4 min)
Chunking text. Edit drills.py. Standard library only; no model calls, no API key.
def split_paragraphs(text):
Split a knowledge-base article into paragraphs.
Paragraphs are separated by one or more blank lines; a blank line may hold spaces or
tabs, and line endings may be "\n" or "\r\n". Single newlines stay inside a
paragraph. Strip each paragraph and drop empty ones. "" or all-whitespace -> [].
Failure messages are enough to go on, so leave the tests unread until you submit.