<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def valid_substitution(strlen, index):
 """ skip performing substitutions that are outside the bounds of the string """

    values = index[0]
    return all([strlen > i for i in values])