Yannick
Rick Lamers
isinstance("", int | str)
https://www.python.org/dev/peps/pep-0604/match command.split():
case ["quit"]:
print("Goodbye!")
quit_game()
case ["look"]:
current_room.describe()
case ["get", obj]:
character.get(obj, current_room)
case ["go", direction]:
current_room = current_room.neighbor(direction)
# The rest of your commands go here
Structural pattern matching ☑️Abid
10/05/2021, 8:46 AMYannick
Rick Lamers