diff --git a/code-ch06/op.py b/code-ch06/op.py index 7c17be32..4e563de9 100644 --- a/code-ch06/op.py +++ b/code-ch06/op.py @@ -278,7 +278,7 @@ def op_2over(stack): def op_2rot(stack): if len(stack) < 6: return False - stack.extend(stack[-6:-4]) + stack[:] = stack[:-6] + stack[-4:] + stack[-6:-4] return True