Hmm. very similar to Dan Bader’s example on Real Python to emulate switch statements.21Andres FernandezKhuyen TranFeb 20, 2020·1 min readThis is actually from the book Python Tricks of Dan Bader. I have put that in reference of the article.