Ten small Python tasks, each failing on the fixture and passing with a reference solution, including workflow expectations for a small change, a bugfix, and a delegable change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 lines
204 B
Python
6 lines
204 B
Python
def paginate(items, page, size):
|
|
"""Return the 1-based page of items with the given page size."""
|
|
start = (page - 1) * size
|
|
end = min(start + size, len(items) - 1)
|
|
return items[start:end]
|