Stack

Run Settings
LanguagePython
Language Version
Run Command
from typing import List def execute(program: List[str]) -> List[int]: # initialise the stack stack = [] for instruction in program: # print out the first item in the stack if instruction == "peek": print(stack[-1]) execute([2,5,9,7,4])
Editor Settings
Theme
Key bindings
Full width
Lines