2-Maruza. Mt va Algoritmlar
2-Maruza. MT va Algoritmlar
- Bu sahifa navigatsiya:
- self.items.append(item) def pop(self): if not self.is_empty(): return self.items.pop() else
- return len(self.items) stack = Stack() stack.push(1) stack.push(2) stack.push(3) print("Top element:", stack.peek()) Output: 3
- POPPED: 2 POPPED: 1
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling