<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getoptlist(self, p):
 """Returns all option values stored that match p as a list."""

        optlist = []
        for k, v in self.pairs:
            if k == p:
                optlist.append(v)
        return optlist