Created
September 26, 2017 05:11
-
-
Save andreytwostep/a86cfe6a119b9f89530001b920d7b86d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Stack: | |
def __init__(self): | |
self.items = [] | |
def isEmpty(self): | |
return [] | |
def push(self, item): | |
self.items.append([item]) | |
def pop(self): | |
return self.items.pop() | |
def peek(self): | |
return self.items[len(self.items)-1] | |
def size(self): | |
return len(self.items) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment