def turn ( self ) : first = self . _data . pop ( 0 ) self . _data . append ( first )
python set last element
Turn the ring for a single position . For example [ a b c d ] becomes [ b c d a ] .
def turn(self):
        """Turn the ring for a single position.
        For example, [a, b, c, d] becomes [b, c, d, a]."""
        first = self._data.pop(0)
        self._data.append(first)