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.

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