5ComputationAndData
Grepregexp
JFLAP
MVaP
images
python
1
entier.py
ex22.py
ex2c.py
exo1.py
exo2.py
exo3.py
exo3b.py
first.py
loop.py
math0.py
string0.py
2
3
5
Ctrl1
1Prog.md
2Prog.md
mementopython3-english.pdf
python-cheatsheets.pdf
.DS_Store
0Evaluation.md
0InformationTheory.md
1ComputationAndData.md
1InformationTheory.md
2BisInformationTheory2023-01-04-Note-15-10.pdf
2BisInformationTheory2023-01-04-Note-15-10.xopp
2ComputationAndData.md
2InformationTheory.md
3ComputationAndData.md
3ComputationAndDataCorrectionsExosCircuitBool2022-10-03-Note-09-25.pdf
4ComputationAndData.md
5ComputationAndData.md
LICENSE
README.md
renommé : exo1.py -> 1/exo1.py renommé : exo2.py -> 1/exo2.py renommé : exo3.py -> 1/exo3.py renommé : exo3b.py -> 1/exo3b.py renommé : first.py -> 1/first.py renommé : loop.py -> 1/loop.py renommé : math0.py -> 1/math0.py renommé : string0.py -> 1/string0.py nouveau fichier : 2Prog.md
18 lines
487 B
Python
18 lines
487 B
Python
# operations sur les chaines de caractères
|
|
|
|
w = "toto est malade"
|
|
print("La longueur de la chaine", w, "est",len(w)) # len (w) la longueur du mot
|
|
print(w.capitalize()) # premiere lettre en majuscule
|
|
print(w.upper()) # met en majuscule
|
|
print(w.lower())
|
|
print(w.title()) # met en majuscule les premieres lettres des mots
|
|
|
|
|
|
print("toto".title())
|
|
|
|
w2 = " mais il est content!"
|
|
|
|
print(w+w2) # concaténation
|
|
|
|
print(w[3:9]) # affiche les caracteres en 4eme position jusqu'à la 8eme incluse
|