Dec 10, 2021
Thanks for the correction and for reading my post.
A case statement in my opinion is less readable that what I offered here. However, it really depends on your conditions though, if they are simple, I'd use the Dict approach as it creates a very readable and clean code segment without extra' ifs' behind the scene. Otherwise, the new Python 3.10 match case feature is a nice option.