Development/Algorithm

[이코테 2021] 5장 그래프 탐색 알고리즘 [기초] 스택

jstar0525 2022. 5. 10. 03:54
반응형
stack = []

stack.append(5)
stack.append(2)
stack.append(3)
stack.append(7)
stack.pop()
stack.append(1)
stack.append(4)
stack.pop()

print(stack)
print(stack[::-1])
반응형