<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cap(v, l):
 """Shortens string is above certain length."""

    s = str(v)
    return s if len(s) <= l else s[-l:]