(Jan-19-2022, 06:56 PM)deanhystad Wrote: Are you trying to use the new structural pattern matching introduced in Python 3.10?
Frankly i was reading on stackoverflow this https://stackoverflow.com/questions/6020...-in-python
After reading this i am not sure anymore it seems there is no switch case in Python.
According to this page https://data-flair.training/blogs/python-switch-case/ you can use dictionnary or with a function to replace the abscence of real method.
I dont want to enter in anything comlex, i am just stuying and trying experiences so i just thought there was an easy way to replace the if and elifs.
If it is to replace everything by a series of def, better use if and elif. As long as you dont have 30 choices.