Created
March 21, 2021 18:38
-
-
Save Clivern/01df47739318634f120545e14db2b545 to your computer and use it in GitHub Desktop.
Python Queue
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 Queue(): | |
| def __init__(self): | |
| self.queue = [] | |
| def enqueueCharacter(self, char): | |
| self.queue.insert(0, char) | |
| def dequeueCharacter(self): | |
| return self.queue.pop() | |
| def __repr__(self): | |
| return str(self.queue) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment