_

Soft KeywordPython 3.10+Advanced

Wildcard pattern in match/case; catches anything

Quick Info

Documentation
Official Docs
Python Version
3.10+
Install
N/A — requires Python 3.10+

Learn by Difficulty

Quick Example

python
# _ keyword
print("Demonstrating the '_' keyword")
help("_")

The '_' keyword is used for wildcard pattern in match/case; catches anything.

Try in Playground

Tags

languagesyntaxcorepattern-matchingwildcardconvention

Related Items