<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _mid(string, start, end=None):
 """ Returns a substring delimited by start and end position. """

    if end is None:
        end = len(string)
    return string[start:start + end]