Created
September 8, 2021 08:31
-
-
Save RyanKor/090219e0ab04fa10d391b32c8fe29f04 to your computer and use it in GitHub Desktop.
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 HauntedBus: | |
| def __init__(self, passengers=None): | |
| if passengers is None: | |
| self.passengers = [] | |
| else: | |
| self.passengers = list(passengers) | |
| def pick(self, name): | |
| self.passengers.append(name) | |
| def drop(self, name): | |
| self.passengers.remove(name) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment