From 6879f7dc219fe6be156927210a4f73ef1b0e5618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E7=90=9B?= <66410605+pengchzn@users.noreply.github.com> Date: Thu, 1 Dec 2022 06:50:25 +0800 Subject: [PATCH] Update array_stack.py An type error of ";" --- codes/python/chapter_stack_and_queue/array_stack.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codes/python/chapter_stack_and_queue/array_stack.py b/codes/python/chapter_stack_and_queue/array_stack.py index b1640a0..23e4b4b 100644 --- a/codes/python/chapter_stack_and_queue/array_stack.py +++ b/codes/python/chapter_stack_and_queue/array_stack.py @@ -60,8 +60,8 @@ if __name__ == "__main__": print("栈顶元素 peek =", peek) """ 访问索引 index 处元素 """ - num = stack.get(3); - print("栈索引 3 处的元素为 num =", num); + num = stack.get(3) + print("栈索引 3 处的元素为 num =", num) """ 元素出栈 """ pop = stack.pop() @@ -74,4 +74,4 @@ if __name__ == "__main__": """ 判断是否为空 """ is_empty = stack.is_empty() - print("栈是否为空 =", is_empty) \ No newline at end of file + print("栈是否为空 =", is_empty)