Commit 6db95fe9ac74a03e518d9a937b2a38b78dd81d30

Authored by Rémi Emonet
1 parent 754a278f4b
Exists in master

Liste en compréhension

Showing 32 changed files with 598 additions and 223 deletions

01-cours-outils-info/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
02-intro-outils-info/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
03-terminal-et-bash/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
04-bash-et-chemins/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
05-python-intro/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
06-operations-arith/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
07-variables-et-types/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
08-erreurs/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
09-fonction-et-aide/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
10-import-biblio/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
11-biblio-qtido/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
12-input-conversion/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
13-condition-if/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
14-conditions-else/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-21 16:49:34 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -135,6 +135,8 @@
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
137 137  
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
  139 +
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
140 142 </ul>
... ... @@ -396,33 +398,6 @@
396 398 <script src="../assets/js/bootstrap.min.js"></script>
397 399 <script src="../assets/js/lesson.js"></script>
398 400  
399   -<!-- clicky -->
400   -<script type="text/javascript">
401   -var clicky_site_ids = clicky_site_ids || [];
402   -clicky_site_ids.push(100779706);
403   -(function() {
404   - var s = document.createElement('script');
405   - s.type = 'text/javascript';
406   - s.async = true;
407   - s.src = '//static.getclicky.com/js';
408   - ( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
409   -})();
410   -</script>
411   -<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/100779706ns.gif" /></p></noscript>
412   -
413   -
414   -<!-- Histats.com START (aync)-->
415   -<script type="text/javascript">var _Hasync= _Hasync|| [];
416   -_Hasync.push(['Histats.start', '1,2767123,4,0,0,0,00010000']);
417   -_Hasync.push(['Histats.fasi', '1']);
418   -_Hasync.push(['Histats.track_hits', '']);
419   -(function() {
420   -var hs = document.createElement('script'); hs.type = 'text/javascript'; hs.async = true;
421   -hs.src = ('//s10.histats.com/js15_as.js');
422   -(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(hs);
423   -})();</script>
424   -<noscript><a href="//www.histats.com" target="_blank"><img src="//sstatic1.histats.com/0.gif?2767123&101" alt="javascript hit counter" border="0"></a></noscript>
425   -<!-- Histats.com END -->
426 401 </body>
427 402 </html>
15-boucle-while/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
16-listes-base/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
17-listes-plus/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
18-boucle-for/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
19-def-fonctions/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
20-cours-info-l2/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -135,6 +135,8 @@
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
137 137  
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
  139 +
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
140 142 </ul>
... ... @@ -194,7 +196,7 @@
194 196 <div class="col-xs-1">
195 197 <h3 class="text-right">
196 198  
197   - <a href="../"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a>
  199 + <a href="../21-liste-en-comprehension/"><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span><span class="sr-only">next episode</span></a>
198 200  
199 201 </h3>
200 202 </div>
... ... @@ -300,7 +302,7 @@
300 302 <div class="col-xs-1">
301 303 <h3 class="text-right">
302 304  
303   - <a href="../"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a>
  305 + <a href="../21-liste-en-comprehension/"><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span><span class="sr-only">next episode</span></a>
304 306  
305 307 </h3>
306 308 </div>
21-liste-en-comprehension/index.html View file @ 6db95fe
  1 +
  2 +
  3 +
  4 +
  5 +<!doctype html>
  6 +<html lang="en">
  7 + <head>
  8 + <meta charset="utf-8">
  9 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
  11 + <meta name="viewport" content="width=device-width, initial-scale=1">
  12 + <!-- meta "search-domain" used for google site search function google_search() -->
  13 + <meta name="search-domain" value="">
  14 + <link rel="stylesheet" type="text/css" href="../assets/css/bootstrap.css" />
  15 + <link rel="stylesheet" type="text/css" href="../assets/css/bootstrap-theme.css" />
  16 + <link rel="stylesheet" type="text/css" href="../assets/css/lesson.css" />
  17 + <link rel="stylesheet" type="text/css" href="../assets/css/syntax.css" />
  18 +
  19 +
  20 +
  21 +
  22 +
  23 + <!-- Favicons for everyone -->
  24 + <link rel="apple-touch-icon-precomposed" sizes="57x57" href="/assets/favicons/UJM/apple-touch-icon-57x57.png" />
  25 + <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/assets/favicons/UJM/apple-touch-icon-114x114.png" />
  26 + <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/assets/favicons/UJM/apple-touch-icon-72x72.png" />
  27 + <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/assets/favicons/UJM/apple-touch-icon-144x144.png" />
  28 + <link rel="apple-touch-icon-precomposed" sizes="60x60" href="/assets/favicons/UJM/apple-touch-icon-60x60.png" />
  29 + <link rel="apple-touch-icon-precomposed" sizes="120x120" href="/assets/favicons/UJM/apple-touch-icon-120x120.png" />
  30 + <link rel="apple-touch-icon-precomposed" sizes="76x76" href="/assets/favicons/UJM/apple-touch-icon-76x76.png" />
  31 + <link rel="apple-touch-icon-precomposed" sizes="152x152" href="/assets/favicons/UJM/apple-touch-icon-152x152.png" />
  32 + <link rel="icon" type="image/png" href="/assets/favicons/UJM/favicon-196x196.png" sizes="196x196" />
  33 + <link rel="icon" type="image/png" href="/assets/favicons/UJM/favicon-96x96.png" sizes="96x96" />
  34 + <link rel="icon" type="image/png" href="/assets/favicons/UJM/favicon-32x32.png" sizes="32x32" />
  35 + <link rel="icon" type="image/png" href="/assets/favicons/UJM/favicon-16x16.png" sizes="16x16" />
  36 + <link rel="icon" type="image/png" href="/assets/favicons/UJM/favicon-128.png" sizes="128x128" />
  37 + <meta name="application-name" content=" - Programmer en Python"/>
  38 + <meta name="msapplication-TileColor" content="#FFFFFF" />
  39 + <meta name="msapplication-TileImage" content="/assets/favicons/UJM/mstile-144x144.png" />
  40 + <meta name="msapplication-square70x70logo" content="/assets/favicons/UJM/mstile-70x70.png" />
  41 + <meta name="msapplication-square150x150logo" content="/assets/favicons/UJM/mstile-150x150.png" />
  42 + <meta name="msapplication-wide310x150logo" content="/assets/favicons/UJM/mstile-310x150.png" />
  43 + <meta name="msapplication-square310x310logo" content="/assets/favicons/UJM/mstile-310x310.png" />
  44 +
  45 +
  46 + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  47 + <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  48 + <!--[if lt IE 9]>
  49 + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  50 + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  51 + <![endif]-->
  52 + <title>Programmer en Python: Listes en compréhension</title>
  53 + </head>
  54 + <body>
  55 +
  56 +
  57 +
  58 +
  59 +
  60 + <div class="container">
  61 +
  62 +<nav class="navbar navbar-default">
  63 + <div class="container-fluid">
  64 + <div class="navbar-header">
  65 + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
  66 + <span class="sr-only">Toggle navigation</span>
  67 + <span class="icon-bar"></span>
  68 + <span class="icon-bar"></span>
  69 + <span class="icon-bar"></span>
  70 + </button>
  71 +
  72 +
  73 +
  74 + <a href=".." class="pull-left">
  75 + <img class="navbar-logo" src="../assets/img/UJM-logo.svg" alt="UJM logo" />
  76 + </a>
  77 +
  78 +
  79 +
  80 + <a class="navbar-brand" href="../">Accueil</a>
  81 +
  82 + </div>
  83 + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
  84 + <ul class="nav navbar-nav">
  85 +
  86 +
  87 +
  88 +
  89 +
  90 + <!--li><a href="../setup/">Setup</a></li-->
  91 + <li><a href="../reference/">Réference</a></li>
  92 +
  93 +
  94 + <li class="dropdown">
  95 + <a href="../" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Épisodes <span class="caret"></span></a>
  96 + <ul class="dropdown-menu">
  97 +
  98 + <li><a href="../01-cours-outils-info/">〚Cours〛Outils Informatique</a></li>
  99 +
  100 + <li><a href="../02-intro-outils-info/">Informatique et Programmation Impérative</a></li>
  101 +
  102 + <li><a href="../03-terminal-et-bash/">Le Terminal et Bash</a></li>
  103 +
  104 + <li><a href="../04-bash-et-chemins/">Arborescences de Fichier et Bash</a></li>
  105 +
  106 + <li><a href="../05-python-intro/">Un Premier Programme</a></li>
  107 +
  108 + <li><a href="../06-operations-arith/">Opérations sur des Nombres</a></li>
  109 +
  110 + <li><a href="../07-variables-et-types/">Variables et Types</a></li>
  111 +
  112 + <li><a href="../08-erreurs/">Apprendre par l'Erreur</a></li>
  113 +
  114 + <li><a href="../09-fonction-et-aide/">Fonctions Prédéfinies et Aide</a></li>
  115 +
  116 + <li><a href="../10-import-biblio/">Bibliothèques et Importation de Fonctions</a></li>
  117 +
  118 + <li><a href="../11-biblio-qtido/">Bibliothèque Graphique qtido</a></li>
  119 +
  120 + <li><a href="../12-input-conversion/">Entrées Utilisateur</a></li>
  121 +
  122 + <li><a href="../13-condition-if/">Instructions Conditionnelles</a></li>
  123 +
  124 + <li><a href="../14-conditions-else/">Instructions Conditionnelles (2)</a></li>
  125 +
  126 + <li><a href="../15-boucle-while/">Boucles while (tant que)</a></li>
  127 +
  128 + <li><a href="../16-listes-base/">Listes de Valeurs</a></li>
  129 +
  130 + <li><a href="../17-listes-plus/">Listes de Valeurs (2)</a></li>
  131 +
  132 + <li><a href="../18-boucle-for/">Boucles for</a></li>
  133 +
  134 + <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
  135 +
  136 + <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
  139 +
  140 + <li role="separator" class="divider"></li>
  141 + <li><a href="../aio/">All in one page (Beta)</a></li>
  142 + </ul>
  143 + </li>
  144 +
  145 +
  146 + <li><a href="../installation/">Installation</a></li>
  147 +
  148 +
  149 +
  150 + <li class="dropdown">
  151 + <a href="../" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Extras <span class="caret"></span></a>
  152 + <ul class="dropdown-menu">
  153 + <li><a href="../reference/">Reference</a></li>
  154 +
  155 + <li><a href="../more-bashtips/">Astuces Bash</a></li>
  156 +
  157 + <li><a href="../reference-qtido/">Référence qtido</a></li>
  158 +
  159 + <li><a href="../about/">About</a></li>
  160 +
  161 + <li><a href="../figures/">Figures</a></li>
  162 +
  163 + <li><a href="../license/">License</a></li>
  164 + </ul>
  165 + </li>
  166 +
  167 +
  168 +
  169 +
  170 + <li><a href="https://github.com/twitwi/cours2python/edit/master/_episodes/21-liste-en-comprehension.md">Améliorer cette page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
  171 +
  172 + </ul>
  173 + <form class="navbar-form navbar-right" role="search" id="search" onsubmit="google_search(); return false;">
  174 + <div class="form-group">
  175 + <input type="text" id="google-search" placeholder="Search..." aria-label="Google site search">
  176 + </div>
  177 + </form>
  178 + </div>
  179 + </div>
  180 +</nav>
  181 +
  182 +
  183 +<div class="row">
  184 + <div class="col-xs-1">
  185 + <h3 class="text-left">
  186 +
  187 + <a href="../20-cours-info-l2/"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span><span class="sr-only">previous episode</span></a>
  188 +
  189 + </h3>
  190 + </div>
  191 + <div class="col-xs-10">
  192 +
  193 + <h3 class="maintitle"><a href="../">Programmer en Python</a></h3>
  194 +
  195 + </div>
  196 + <div class="col-xs-1">
  197 + <h3 class="text-right">
  198 +
  199 + <a href="../"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a>
  200 +
  201 + </h3>
  202 + </div>
  203 +</div>
  204 +
  205 +<article>
  206 +<div class="row">
  207 + <div class="col-md-1">
  208 + </div>
  209 + <div class="col-md-10">
  210 + <h1 class="maintitle">Listes en compréhension</h1>
  211 + </div>
  212 + <div class="col-md-1">
  213 + </div>
  214 +</div>
  215 +
  216 +
  217 +<blockquote class="objectives">
  218 + <h2>Aperçu</h2>
  219 +
  220 + <div class="row">
  221 + <div class="col-md-1">
  222 + <!--
  223 + <strong>Teaching:</strong> 0 min
  224 + <br/>
  225 + <strong>Exercises:</strong> 0 min
  226 + -->
  227 + </div>
  228 + <div class="col-md-9">
  229 + <strong>Questions</strong>
  230 + <ul>
  231 +
  232 + <li><p>Comment simplifier la création de listes ?</p>
  233 +</li>
  234 +
  235 + </ul>
  236 + </div>
  237 + </div>
  238 +
  239 + <div class="row">
  240 + <div class="col-md-1">
  241 + </div>
  242 + <div class="col-md-10">
  243 + <strong>Objectifs</strong>
  244 + <ul>
  245 +
  246 + <li><p>Découvrir la syntaxe de « liste en compréhension ».</p>
  247 +</li>
  248 +
  249 + <li><p>Comprendre que ce n’est qu’un raccourci pour un <code class="highlighter-rouge">for</code> avec append.</p>
  250 +</li>
  251 +
  252 + </ul>
  253 + </div>
  254 + </div>
  255 +
  256 +</blockquote>
  257 +
  258 +<p>Il est souvent nécessaire dans un programme d’appliquer un calcul sur chacun des éléments d’une liste.
  259 +Le résultat de ces calculs est souvent stocké dans une nouvelle liste.
  260 +Par exemple, si nous avons une liste de nombres dont nous voulons calculer le carré, nous allons mettre ces nombres dans une liste, par exemple ici dans <code class="highlighter-rouge">nbs</code> :</p>
  261 +
  262 +<div class="language-python source highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">nbs</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">42</span><span class="p">,</span> <span class="mi">100</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]</span>
  263 +</code></pre></div></div>
  264 +
  265 +<p>et remplir, à l’aide d’une boucle et de <code class="highlighter-rouge">append</code>, une nouvelle liste avec les carrés de ces nombres, que l’on appelle dans cet exemple <code class="highlighter-rouge">carres</code> :</p>
  266 +
  267 +<div class="language-python source highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">carres</span> <span class="o">=</span> <span class="p">[]</span>
  268 +<span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">nbs</span><span class="p">:</span>
  269 + <span class="n">carres</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">v</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span>
  270 +</code></pre></div></div>
  271 +
  272 +<p>Ce besoin est tellement fréquent que Python nous propose une syntaxe (façon d’écrire le programme) qui permet de rendre, avec l’habitude, le programme plus facile à lire (et écrire).
  273 +Ainsi, la définition et le remplissage de <code class="highlighter-rouge">carres</code> ci-dessus, peut être remplacée de manière équivalente par :</p>
  274 +
  275 +<div class="language-python source highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">carres</span> <span class="o">=</span> <span class="p">[</span><span class="n">v</span><span class="o">**</span><span class="mi">2</span> <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">nbs</span><span class="p">]</span>
  276 +</code></pre></div></div>
  277 +
  278 +<p>Cette construction est appelée « liste en compréhension ».</p>
  279 +
  280 +<p>Il n’y a pas de contrainte particulière sur la liste parcourue par le <code class="highlighter-rouge">for</code>.
  281 +Ainsi, il est tout à fait possible d’utiliser la fonction <code class="highlighter-rouge">range</code>, par exemple pour remplir une liste des carrés des nombres de 1 à 100 :</p>
  282 +
  283 +<div class="language-python source highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">carres100</span> <span class="o">=</span> <span class="p">[</span><span class="n">v</span><span class="o">**</span><span class="mi">2</span> <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">101</span><span class="p">)]</span>
  284 +</code></pre></div></div>
  285 +
  286 +<p>Si besoin, on peut aussi ajouter une condition après le <code class="highlighter-rouge">for</code>, comme ici :</p>
  287 +<div class="language-python source highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">cubes_des_multiples_de_4</span> <span class="o">=</span> <span class="p">[</span><span class="n">v</span><span class="o">**</span><span class="mi">3</span> <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">101</span><span class="p">)</span> <span class="k">if</span> <span class="n">n</span><span class="o">%</span><span class="mi">4</span><span class="o">==</span><span class="mi">0</span><span class="p">]</span>
  288 +</code></pre></div></div>
  289 +
  290 +<p>On peut aussi créer des listes de listes en imbriquant plusieurs listes en compréhension, comme ici :</p>
  291 +
  292 +<div class="language-python source highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">tab</span> <span class="o">=</span> <span class="p">[</span> <span class="p">[</span> <span class="mi">10</span><span class="o">*</span><span class="n">i</span> <span class="o">+</span> <span class="n">j</span> <span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span> <span class="p">]</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span> <span class="p">]</span>
  293 +</code></pre></div></div>
  294 +
  295 +<p>qui produit une liste de 4 éléments, chacun de ces éléments étant lui même une liste de 5 éléments (qui sont calculés en fonction des valeurs de i et j), qui s’affiche comme ça :</p>
  296 +
  297 +<div class="output highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[[0, 1, 2, 3, 4], [10, 11, 12, 13, 14], [20, 21, 22, 23, 24], [30, 31, 32, 33, 34]]
  298 +</code></pre></div></div>
  299 +
  300 +<p>ou avec un peu de remise en forme :</p>
  301 +
  302 +<div class="output highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[ [0, 1, 2, 3, 4],
  303 + [10, 11, 12, 13, 14],
  304 + [20, 21, 22, 23, 24],
  305 + [30, 31, 32, 33, 34] ]
  306 +</code></pre></div></div>
  307 +
  308 +<p>dans lequel on aura par exemple <code class="highlighter-rouge">tab[3][1]</code> qui vaut 31.</p>
  309 +
  310 +<blockquote class="syntax">
  311 + <h2 id="syntaxe--liste-en-compréhension">Syntaxe : Liste en compréhension</h2>
  312 + <ul>
  313 + <li>Une liste en compréhension est un raccourci pour créer une liste par ajout successifs d’éléments.</li>
  314 + <li>Une liste en compréhension utilise des crochets (<code class="highlighter-rouge">[</code> et <code class="highlighter-rouge">]</code>] comme une liste classique, mais dans lesquelles on mets une expression suivie d’un <code class="highlighter-rouge">for</code>.</li>
  315 + <li>Pour chaque élément de la liste venant après <code class="highlighter-rouge">for</code>, l’expression est évaluée et le résultat est ajouté dans la liste finale.</li>
  316 + </ul>
  317 +
  318 + <div class="language-python source highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span> <span class="err">«</span><span class="n">expr</span><span class="err">»</span> <span class="k">for</span> <span class="err">«</span><span class="n">var</span><span class="err">»</span> <span class="ow">in</span> <span class="err">«</span><span class="n">liste</span><span class="err">»</span><span class="p">]</span>
  319 +</code></pre></div> </div>
  320 +
  321 + <p>La liste en compréhension peut être utilisée partout où une liste peut l’être.
  322 +Ainsi, par exemple :</p>
  323 +
  324 + <div class="language-python source highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="err">«</span><span class="n">r</span><span class="err">»</span> <span class="o">=</span> <span class="p">[</span> <span class="err">«</span><span class="n">expr</span><span class="err">»</span> <span class="k">for</span> <span class="err">«</span><span class="n">var</span><span class="err">»</span> <span class="ow">in</span> <span class="err">«</span><span class="n">liste</span><span class="err">»</span><span class="p">]</span>
  325 +</code></pre></div> </div>
  326 +
  327 + <p>est équivalente à :</p>
  328 +
  329 + <div class="language-python source highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="err">«</span><span class="n">r</span><span class="err">»</span> <span class="o">=</span> <span class="p">[]</span>
  330 +<span class="k">for</span> <span class="err">«</span><span class="n">var</span><span class="err">»</span> <span class="ow">in</span> <span class="err">«</span><span class="n">liste</span><span class="err">»</span><span class="p">:</span>
  331 + <span class="err">«</span><span class="n">r</span><span class="err">»</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="err">«</span><span class="n">expr</span><span class="err">»</span><span class="p">)</span>
  332 +</code></pre></div> </div>
  333 +</blockquote>
  334 +
  335 +<blockquote class="syntax">
  336 + <h2 id="syntaxe--liste-en-compréhension-avec-condition">Syntaxe : Liste en compréhension avec condition</h2>
  337 + <p>Ainsi, par exemple :</p>
  338 +
  339 + <div class="language-python source highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="err">«</span><span class="n">var2</span><span class="err">»</span> <span class="o">=</span> <span class="p">[</span> <span class="err">«</span><span class="n">expr</span><span class="err">»</span> <span class="k">for</span> <span class="err">«</span><span class="n">var</span><span class="err">»</span> <span class="ow">in</span> <span class="err">«</span><span class="n">liste</span><span class="err">»</span> <span class="k">if</span> <span class="err">«</span><span class="n">cond</span><span class="err">»</span><span class="p">]</span>
  340 +</code></pre></div> </div>
  341 +
  342 + <p>est équivalente à :</p>
  343 +
  344 + <div class="language-python source highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="err">«</span><span class="n">var2</span><span class="err">»</span> <span class="o">=</span> <span class="p">[]</span>
  345 +<span class="k">for</span> <span class="err">«</span><span class="n">var</span><span class="err">»</span> <span class="ow">in</span> <span class="err">«</span><span class="n">liste</span><span class="err">»</span><span class="p">:</span>
  346 + <span class="k">if</span> <span class="err">«</span><span class="n">cond</span><span class="err">»</span><span class="p">:</span>
  347 + <span class="err">«</span><span class="n">var2</span><span class="err">»</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="err">«</span><span class="n">expr</span><span class="err">»</span><span class="p">)</span>
  348 +</code></pre></div> </div>
  349 +</blockquote>
  350 +
  351 +
  352 +<blockquote class="keypoints">
  353 + <h2>Points Clés</h2>
  354 + <ul>
  355 +
  356 + <li><p>Il est possible de mettre un <code class="highlighter-rouge">for</code> dans des crochets pour créer une liste.</p>
  357 +</li>
  358 +
  359 + <li><p>Les listes en compréhesion peuvent contenir des conditions <code class="highlighter-rouge">if</code> et être imbriquées.</p>
  360 +</li>
  361 +
  362 + </ul>
  363 +
  364 +</blockquote>
  365 +
  366 +</article>
  367 +
  368 +<div class="row">
  369 + <div class="col-xs-1">
  370 + <h3 class="text-left">
  371 +
  372 + <a href="../20-cours-info-l2/"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span><span class="sr-only">previous episode</span></a>
  373 +
  374 + </h3>
  375 + </div>
  376 + <div class="col-xs-10">
  377 +
  378 + </div>
  379 + <div class="col-xs-1">
  380 + <h3 class="text-right">
  381 +
  382 + <a href="../"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a>
  383 +
  384 + </h3>
  385 + </div>
  386 +</div>
  387 +
  388 +
  389 +
  390 +
  391 +<footer>
  392 + <div class="row">
  393 + <div class="col-md-6 copyright" align="left">
  394 +
  395 + </div>
  396 + <div class="col-md-6 help-links" align="right">
  397 +
  398 + <a href="https://github.com/twitwi/cours2python/edit/gh-pages/_episodes/21-liste-en-comprehension.md">Edit on GitHub</a>
  399 +
  400 + /
  401 + <a href="https://github.com/twitwi/cours2python/blob/gh-pages/CONTRIBUTING.md">Contributing</a>
  402 + /
  403 + <a href="https://github.com/twitwi/cours2python/">Source</a>
  404 + /
  405 + <a href="https://github.com/twitwi/cours2python/blob/gh-pages/CITATION">Cite</a>
  406 + /
  407 + <a href="mailto:">Contact</a>
  408 + </div>
  409 + </div>
  410 + <div class="row">
  411 + <div class="col-md-12" align="center">
  412 + Using <a href="https://github.com/carpentries/styles/">The Carpentries style</a>
  413 + version <a href="https://github.com/carpentries/styles/releases/tag/v9.5.3">9.5.3</a>.
  414 + </div>
  415 + </div>
  416 +</footer>
  417 +
  418 +
  419 + </div>
  420 +
  421 +<script src="../assets/js/jquery.min.js"></script>
  422 +<script src="../assets/js/bootstrap.min.js"></script>
  423 +<script src="../assets/js/lesson.js"></script>
  424 +
  425 +<!-- clicky -->
  426 +<script type="text/javascript">
  427 +var clicky_site_ids = clicky_site_ids || [];
  428 +clicky_site_ids.push(100779706);
  429 +(function() {
  430 + var s = document.createElement('script');
  431 + s.type = 'text/javascript';
  432 + s.async = true;
  433 + s.src = '//static.getclicky.com/js';
  434 + ( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
  435 +})();
  436 +</script>
  437 +<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/100779706ns.gif" /></p></noscript>
  438 +
  439 +
  440 +<!-- Histats.com START (aync)-->
  441 +<script type="text/javascript">var _Hasync= _Hasync|| [];
  442 +_Hasync.push(['Histats.start', '1,2767123,4,0,0,0,00010000']);
  443 +_Hasync.push(['Histats.fasi', '1']);
  444 +_Hasync.push(['Histats.track_hits', '']);
  445 +(function() {
  446 +var hs = document.createElement('script'); hs.type = 'text/javascript'; hs.async = true;
  447 +hs.src = ('//s10.histats.com/js15_as.js');
  448 +(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(hs);
  449 +})();</script>
  450 +<noscript><a href="//www.histats.com" target="_blank"><img src="//sstatic1.histats.com/0.gif?2767123&101" alt="javascript hit counter" border="0"></a></noscript>
  451 +<!-- Histats.com END -->
  452 + </body>
  453 +</html>
CODE_OF_CONDUCT.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -135,6 +135,8 @@
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
137 137  
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
  139 +
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
140 142 </ul>
... ... @@ -224,33 +226,6 @@
224 226 <script src="../assets/js/bootstrap.min.js"></script>
225 227 <script src="../assets/js/lesson.js"></script>
226 228  
227   -<!-- clicky -->
228   -<script type="text/javascript">
229   -var clicky_site_ids = clicky_site_ids || [];
230   -clicky_site_ids.push(100779706);
231   -(function() {
232   - var s = document.createElement('script');
233   - s.type = 'text/javascript';
234   - s.async = true;
235   - s.src = '//static.getclicky.com/js';
236   - ( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
237   -})();
238   -</script>
239   -<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/100779706ns.gif" /></p></noscript>
240   -
241   -
242   -<!-- Histats.com START (aync)-->
243   -<script type="text/javascript">var _Hasync= _Hasync|| [];
244   -_Hasync.push(['Histats.start', '1,2767123,4,0,0,0,00010000']);
245   -_Hasync.push(['Histats.fasi', '1']);
246   -_Hasync.push(['Histats.track_hits', '']);
247   -(function() {
248   -var hs = document.createElement('script'); hs.type = 'text/javascript'; hs.async = true;
249   -hs.src = ('//s10.histats.com/js15_as.js');
250   -(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(hs);
251   -})();</script>
252   -<noscript><a href="//www.histats.com" target="_blank"><img src="//sstatic1.histats.com/0.gif?2767123&101" alt="javascript hit counter" border="0"></a></noscript>
253   -<!-- Histats.com END -->
254 229 </body>
255 230 </html>
about/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -134,6 +134,8 @@
134 134 <li><a href="../19-def-fonctions/">Définitions de fonctions</a></li>
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
  137 +
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
137 139  
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
aio/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -135,6 +135,8 @@
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
137 137  
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
  139 +
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
140 142 </ul>
141 143  
... ... @@ -222,8 +224,10 @@
222 224  
223 225 "/19-def-fonctions/",
224 226  
225   - "/20-cours-info-l2/"
  227 + "/20-cours-info-l2/",
226 228  
  229 + "/21-liste-en-comprehension/"
  230 +
227 231 ];
228 232 var xmlHttp = []; /* Required since we are going to query every episode. */
229 233 for (i=0; i < lesson_episodes.length; i++) {
... ... @@ -284,6 +288,8 @@
284 288 <article id="/19-def-fonctions/"></article>
285 289  
286 290 <article id="/20-cours-info-l2/"></article>
  291 +
  292 +<article id="/21-liste-en-comprehension/"></article>
287 293  
288 294  
289 295  
figures/index.html View file @ 6db95fe
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-21 16:49:34 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -135,6 +135,8 @@
135 135  
136 136 <li><a href="../20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
137 137  
  138 + <li><a href="../21-liste-en-comprehension/">Listes en compréhension</a></li>
  139 +
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="../aio/">All in one page (Beta)</a></li>
140 142 </ul>
... ... @@ -223,33 +225,6 @@
223 225 <script src="../assets/js/bootstrap.min.js"></script>
224 226 <script src="../assets/js/lesson.js"></script>
225 227  
226   -<!-- clicky -->
227   -<script type="text/javascript">
228   -var clicky_site_ids = clicky_site_ids || [];
229   -clicky_site_ids.push(100779706);
230   -(function() {
231   - var s = document.createElement('script');
232   - s.type = 'text/javascript';
233   - s.async = true;
234   - s.src = '//static.getclicky.com/js';
235   - ( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
236   -})();
237   -</script>
238   -<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/100779706ns.gif" /></p></noscript>
239   -
240   -
241   -<!-- Histats.com START (aync)-->
242   -<script type="text/javascript">var _Hasync= _Hasync|| [];
243   -_Hasync.push(['Histats.start', '1,2767123,4,0,0,0,00010000']);
244   -_Hasync.push(['Histats.fasi', '1']);
245   -_Hasync.push(['Histats.track_hits', '']);
246   -(function() {
247   -var hs = document.createElement('script'); hs.type = 'text/javascript'; hs.async = true;
248   -hs.src = ('//s10.histats.com/js15_as.js');
249   -(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(hs);
250   -})();</script>
251   -<noscript><a href="//www.histats.com" target="_blank"><img src="//sstatic1.histats.com/0.gif?2767123&101" alt="javascript hit counter" border="0"></a></noscript>
252   -<!-- Histats.com END -->
253 228 </body>
254 229 </html>
... ... @@ -7,7 +7,7 @@
7 7 <head>
8 8 <meta charset="utf-8">
9 9 <meta http-equiv="X-UA-Compatible" content="IE=edge">
10   - <meta http-equiv="last-modified" content="2018-09-06 00:30:21 +0200">
  10 + <meta http-equiv="last-modified" content="2018-09-27 11:19:56 +0200">
11 11 <meta name="viewport" content="width=device-width, initial-scale=1">
12 12 <!-- meta "search-domain" used for google site search function google_search() -->
13 13 <meta name="search-domain" value="">
... ... @@ -135,6 +135,8 @@
135 135  
136 136 <li><a href="./20-cours-info-l2/">〚Cours〛Informatique (L2)</a></li>
137 137  
  138 + <li><a href="./21-liste-en-comprehension/">Listes en compréhension</a></li>
  139 +
138 140 <li role="separator" class="divider"></li>
139 141 <li><a href="./aio/">All in one page (Beta)</a></li>
140 142 </ul>
141 143  
... ... @@ -273,7 +275,9 @@
273 275  
274 276  
275 277  
  278 +
276 279  
  280 +
277 281  
278 282 <table class="table table-striped">
279 283 <tr>
280 284  
... ... @@ -907,8 +911,32 @@
907 911 </tr>
908 912  
909 913  
  914 +
  915 +
  916 +
  917 + <tr>
  918 +