Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente |
python:bases:chaines [2022/09/25 10:05] – phil | python:bases:chaines [2022/10/10 08:05] (Version actuelle) – phil |
---|
===== Python - Chaînes de caractères ===== | ===== Python - Chaînes de caractères ===== |
| |
[Mise à jour le : 25/9/2022] | [Mise à jour le : 10/10/2022] |
| |
* **Sources** | * **Sources** |
//Exemple// | //Exemple// |
<code python *.py> | <code python *.py> |
| monscore = 1000 |
f"Vous avez obtenu {monscore} points" # Résultat : Vous avez obtenu 1000 points | f"Vous avez obtenu {monscore} points" # Résultat : Vous avez obtenu 1000 points |
</code> | </code> |
* <html><a href="https://bas.codes/posts/python-slicing" target="_blank">A Comprehensive Guide to Slicing in Python</a></html> | * <html><a href="https://bas.codes/posts/python-slicing" target="_blank">A Comprehensive Guide to Slicing in Python</a></html> |
* <html><a href="https://realpython.com/replace-string-python/" target="_blank">How to Replace a String in Python</a></html> | * <html><a href="https://realpython.com/replace-string-python/" target="_blank">How to Replace a String in Python</a></html> |
| * <html><a href="https://realpython.com/python-string-contains-substring/" target="_blank">How to Check if a Python String Contains a Substring</a></html> |
| * <html><a href="https://realpython.com/inherit-python-str/" target="_blank">Custom Python Strings: Inheriting From str vs UserString</a></html> |