Challenge yourself

Beginner
Intermediate
Expert

Write a function that takes one string and two integers, line, n and m, and returns its characters from index n to index m (including both). Example:

>>> chars('slices', 1, 3)
'lic'
>>> chars('indices', 2, 5)
'dice'