The 'switch' statement in Python 3.10
It's actually called Structural Pattern Matching and is much more powerful than switch
I’ve written a couple of fairly short articles for Python fans who are eager to get up to speed with the new features in Python 3.10.
Python has always lacked a switch statement and this is about to be rectified but you can do a great deal more with Structural Pattern Matching than a simple replacement for if/then/elif. I explain some of the new features with the help of Harry Potter and a dead parrot.
Pattern Matching in Python 3.10
The Switch statement on steroids
More Pattern Matching in Python 3.10
It’s much more powerful than 'switch’. I explain with help from Harry Potter and a dead parrot