算法基礎知識

模擬棧 棧就是後進先出的數據結構node stack = [] def pushit(): stack.append(input('Enter your new string:').strip()) def popit(): if len(stack) == 0: print("You can't pop from an empty stack!") e
相關文章
相關標籤/搜索