Created
March 21, 2021 18:38
-
-
Save Clivern/90702167570ef7d869b3b79f656c6d5d to your computer and use it in GitHub Desktop.
Python Stack
This file contains hidden or 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.stack = [] | |
| def pushCharacter(self, char): | |
| self.stack.append(char) | |
| def popCharacter(self): | |
| return self.stack.pop() | |
| def __repr__(self): | |
| return str(self.stack) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment