ajout tp mastermind et suppression anciens tp
This commit is contained in:
BIN
representation_base/.DS_Store
vendored
BIN
representation_base/.DS_Store
vendored
Binary file not shown.
@@ -72,11 +72,11 @@ False
|
||||
On peut utiliser l'opérateur `in` pour vérifier si un élément est présent dans une structure de données. Par exemple :
|
||||
|
||||
```python
|
||||
>>> "a" in "bonjour" # False
|
||||
>>> "a" in "bonjour"
|
||||
False
|
||||
>>> "bon" in "bonjour" # True
|
||||
>>> "bon" in "bonjour"
|
||||
True
|
||||
>>> 1 in [2, 3, 4] # False
|
||||
>>> 1 in [2, 3, 4]
|
||||
False
|
||||
```
|
||||
|
||||
@@ -131,17 +131,17 @@ False
|
||||
Python permet d'évaluer n'importe quel type de donnée comme un booléen. Par exemple :
|
||||
|
||||
```python
|
||||
>>> bool(1) # Vrai
|
||||
>>> bool(1)
|
||||
True
|
||||
>>> bool(0) # Faux
|
||||
>>> bool(0)
|
||||
False
|
||||
>>> bool("") # Faux
|
||||
>>> bool("")
|
||||
False
|
||||
>>> bool("abc") # Vrai
|
||||
>>> bool("abc")
|
||||
True
|
||||
>>> bool([]) # Faux
|
||||
>>> bool([])
|
||||
False
|
||||
>>> bool([1, 2]) # Vrai
|
||||
>>> bool([1, 2])
|
||||
True
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user