This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| informatique:python [2024/12/11 23:02] – yahiko | informatique:python [2024/12/13 21:11] (current) – yahiko | ||
|---|---|---|---|
| Line 158: | Line 158: | ||
| <code python> | <code python> | ||
| def DashCheck(check): | def DashCheck(check): | ||
| + | # On vérifie le dernier caractère de la chaîne | ||
| if check[-1] == ' | if check[-1] == ' | ||
| + | # Si " | ||
| dash = check[:-1] | dash = check[:-1] | ||
| + | return dash | ||
| else: | else: | ||
| - | dash = str(" | + | return |
| - | return | + | |
| </ | </ | ||