def test_popping_lists(self):
    stack = [10, 20, 30, 40]
    stack.append('last')
    self.assertEqual([10, 20, 30, 40, 'last'], stack)
    popped_value = stack.pop()
    self.assertEqual('last', popped_value)
    self.assertEqual([10, 20, 30, 40], stack)
    popped_value = stack.pop(1)
    self.assertEqual(20, popped_value)
    self.assertEqual([10, 30, 40], stack)
def test_popping_lists(self):
    stack = [10, 20, 30, 40]
    stack.append('last')
    self.assertEqual([10, 20, 30, 40, 'last'], stack)
    popped_value = stack.pop()
    self.assertEqual('last', popped_value)
    self.assertEqual([10, 20, 30, 40], stack)
    popped_value = stack.pop(1)
    self.assertEqual(20, popped_value)
    self.assertEqual([10, 30, 40], stack)