lang:python:condition
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédente | |||
| lang:python:condition [2020/03/06 21:31] – [[[unlikely]] et [[likely]]] : suppression root | lang:python:condition [2025/11/10 09:37] (Version actuelle) – [switch] : utilisation de match / case root | ||
|---|---|---|---|
| Ligne 32: | Ligne 32: | ||
| ====switch==== | ====switch==== | ||
| - | Le '' | + | <code python> |
| - | + | animal = " | |
| + | match animal: | ||
| + | case " | ||
| + | print(" | ||
| + | case " | ||
| + | print(" | ||
| + | case "Python" | " | ||
| + | | ||
| + | case _: | ||
| + | print(" | ||
| + | </ | ||
lang/python/condition.txt · Dernière modification : de root
