Language Syntax

Pattern wildcard — Python syntax

Match any subject without binding a variable. Underscore is a soft keyword in pattern position; outside patterns it remains an ordinary identifier. A standalone unguarded wildcard must be last.

Formal Syntax & Structure

python syntaxpython
case _: suite

Working Example

Example Snippetpython
_=99match [1,2]:    case [_,value]:        result=valueprint((result,_))
Python Reference