<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_get(l, idx, default=None):
 """ Get from a list with an optional default value. """

    try:
        if l[idx]:
            return l[idx]
        else:
            return default
    except IndexError:
        return default