<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def push(self, x):
 """ append items to the stack; input can be a single value or a list """

        if isinstance(x, list):
            for item in x:
                self.stack.append(item)
        else:
            self.stack.append(x)