# 列表就是栈:在末尾 append 和 pop
int_stack = []
int_stack.append(1)
int_stack.append(3)
int_stack.append(5)
# 查看栈顶而不移除它
top = int_stack[-1]
# top is 5
first = int_stack.pop()
# first is 5
second = int_stack.pop()
# second is 3
third = int_stack.pop()
# third is 1
# 空列表为假值
is_empty = not int_stack
# is_empty is True
print(f"{top = }")
print(f"{first = }")
print(f"{second = }")
print(f"{third = }")
print(f"{is_empty = }")