Exploring the new Python match statement, Python’s implementation of switch/case.
If you’ve decided to learn Python  and have any experience with other programming languages, you’ll quickly notice that the ubiquitous
switch statement is nowhere to be found. Soon, though, that will no longer be the case (sort of). Python 3.10 is slated to be released in October 2021 and includes the new
match command  .
The function of
switch is akin to trying to find a particular office in an office building. As you walk down the hallway, you look at each door to see if it displays the number or name in which you are interested. When you find it, you stop searching and go inside. In C (and indeed many other languages)
switch allows you to compare a value against a set of others (Listing 1).
switch starts the compare operation, with the value you want to check passed in. The sets of curly braces then contain your
Use Express-Checkout link below to read the full article (PDF).