三四加等于几
运行下面这段程序:
st = []
for t in ["3", "4", "+"]:
if t == "+":
b = st.pop()
a = st.pop()
st.append(a + b)
else:
st.append(int(t))
print(st.pop())
运行下面这段程序:
st = []
for t in ["3", "4", "+"]:
if t == "+":
b = st.pop()
a = st.pop()
st.append(a + b)
else:
st.append(int(t))
print(st.pop())
全部评论