Is there a way to match inequalities in Python ≥ 3.10?
07:57 25 Oct 2021

The new structural pattern matching feature in Python 3.10 is a very welcome feature. Is there a way to match inequalities using this statement? Prototype example:

match a:
    case < 42:
        print('Less')
    case == 42:
        print('The answer')
    case > 42:
        print('Greater')
python python-3.10 structural-pattern-matching