edit nom variables
This commit is contained in:
@@ -70,7 +70,7 @@ Que retournent ces lignes python ?
|
|||||||
On peut afficher la liste de la même manière qu'une variable classique : avec la commande *print*
|
On peut afficher la liste de la même manière qu'une variable classique : avec la commande *print*
|
||||||
|
|
||||||
```python
|
```python
|
||||||
print(tab)
|
print(liste)
|
||||||
```
|
```
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
@@ -121,7 +121,7 @@ On peut également initialiser une liste à partir d'une autre :
|
|||||||
|
|
||||||
```pytho
|
```pytho
|
||||||
liste_1 = [1, 2, 3, 4]
|
liste_1 = [1, 2, 3, 4]
|
||||||
liste_2 = [2 * x for x in tab_1]
|
liste_2 = [2 * x for x in liste_1]
|
||||||
print(liste_2)
|
print(liste_2)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user