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édenteProchaine révision | Révision précédente | ||
| lang:python:condition [2020/02/24 21:07] – Ajout de "[[unlikely]] et [[likely]]" 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 = " | |
| - | ====[[unlikely]] et [[likely]]==== | + | match animal: |
| - | + | case " | |
| - | Il n'y a pas d' | + | print(" |
| + | case " | ||
| + | print(" | ||
| + | case "Python" | " | ||
| + | | ||
| + | case _: | ||
| + | | ||
| + | </ | ||
lang/python/condition.1582574850.txt.gz · Dernière modification : de root
