Teks sumber — English
Terjemahan — Bahasa Indonesia
See :pep:`572` for more information.
Lihat :pep:`572` untuk informasi lebih lanjut.
In general, structured switch statements execute one block of code when an expression has a particular value or set of values. Since Python 3.10 one can easily match literal values, or constants within a namespace, with a ``match ... case`` statement. See :ref:`the specification <match>` and :ref:`the tutorial <tut-match>` for more information about :keyword:`match` statements. An older alternative is a sequence of ``if... elif... elif... else``.