<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pop(self, i=None):
 """Remove the item at the given position in the list, and return it. If no index is specified, removes and returns the last item in the list."""

        if i is None:
            i = len(self) - 1
        val = self[i]
        del(self[i])
        return val