Diferències
Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.
| Ambdós costats versió prèvia Revisió prèvia Següent revisió | Revisió prèvia | ||
| development:python:strings [25/10/2023 08:32] – [string formatting] mate | development:python:strings [10/10/2024 00:53] (actual) – [f-strings (Literal String Interpolation)] mate | ||
|---|---|---|---|
| Línia 1: | Línia 1: | ||
| = Python strings | = Python strings | ||
| + | {{tag> | ||
| == comp | == comp | ||
| * Exact match (equality comparison): | * Exact match (equality comparison): | ||
| Línia 13: | Línia 14: | ||
| * ''" | * ''" | ||
| * ''" | * ''" | ||
| - | * ''" | + | * ''" | 
| * interpolación (f-string): '' | * interpolación (f-string): '' | ||
| * Template strings | * Template strings | ||
| Línia 31: | Línia 32: | ||
| </ | </ | ||
| Backslash Cannot be used in format string directly. | Backslash Cannot be used in format string directly. | ||
| - | <code python | + | <code python error> | 
| f" | f" | ||
| </ | </ | ||
| - | <code python | + | <code python correcto> | 
| newline = ord(' | newline = ord(' | ||