{"id":1862,"date":"2020-04-11T17:53:32","date_gmt":"2020-04-11T15:53:32","guid":{"rendered":"http:\/\/www.ardpylab.fr\/?page_id=1862"},"modified":"2020-05-24T15:50:47","modified_gmt":"2020-05-24T13:50:47","slug":"les-listes","status":"publish","type":"page","link":"https:\/\/www.ardpylab.fr\/?page_id=1862","title":{"rendered":"Les listes"},"content":{"rendered":"\n<p><br>En python, les listes sont des variables qui peuvent contenir n\u2019importe quel type de donn\u00e9es.<\/p>\n<p>Elles sont not\u00e9es sous forme d\u2019\u00e9l\u00e9ments entre crochets s\u00e9par\u00e9s par des virgules.<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1863\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist1.png\" alt=\"\" width=\"197\" height=\"48\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>La num\u00e9rotation des \u00e9l\u00e9ments des listes commence \u00e0 0.<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1864\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist2.png\" alt=\"\" width=\"202\" height=\"79\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>Les listes correspondent \u00e0 des objets auxquels, il est possible d\u2019appliquer des m\u00e9thodes&nbsp;:<\/p>\n<p>. <strong>len()<\/strong> renvoie le nombre d\u2019\u00e9l\u00e9ments de la liste&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1865\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist3.png\" alt=\"\" width=\"196\" height=\"48\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. <strong>append(e)<\/strong> ajoute un \u00e9l\u00e9ment <strong>e<\/strong> \u00e0 la liste&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1866\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist4.png\" alt=\"\" width=\"193\" height=\"50\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. <strong>sort()<\/strong> trie les \u00e9l\u00e9ments de la liste si elle contient des donn\u00e9es du m\u00eame type&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1867\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist5.png\" alt=\"\" width=\"159\" height=\"63\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1868\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist6.png\" alt=\"\" width=\"275\" height=\"64\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. <strong>remove(e)<\/strong> retire l\u2019\u00e9l\u00e9ment e de la liste&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1869\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist7.png\" alt=\"\" width=\"199\" height=\"65\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. <strong>pop()<\/strong> enl\u00e8ve le dernier \u00e9l\u00e9ment de la liste&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1870\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist8.png\" alt=\"\" width=\"219\" height=\"95\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. <strong>pop(i)<\/strong> enl\u00e8ve l\u2019\u00e9l\u00e9ment d\u2019indice <strong>i<\/strong> de la liste&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1871\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist9.png\" alt=\"\" width=\"209\" height=\"93\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. <strong>index(e)<\/strong> retourne la position de l\u2019\u00e9l\u00e9ment <strong>e <\/strong>de la liste<strong>&nbsp;:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1879\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist10.png\" alt=\"\" width=\"197\" height=\"45\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. <strong>reverse()<\/strong> inverse l\u2019ordre des \u00e9l\u00e9ments de la liste&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1880\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist11.png\" alt=\"\" width=\"197\" height=\"62\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. <strong>count(e)<\/strong> compte le nombre d\u2019occurrence de l\u2019\u00e9l\u00e9ment e dans la liste&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1881\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist12.png\" alt=\"\" width=\"169\" height=\"79\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. <strong>extend()<\/strong> concat\u00e8ne deux listes&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1882\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist13.png\" alt=\"\" width=\"260\" height=\"77\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p><u><br \/>Remarques<\/u>\u00a0:<\/p>\n<p>. Une liste <strong>l<\/strong> vide s\u2019\u00e9crit\u00a0: <strong>l = [ ]<\/strong><\/p>\n<p>. La fonction <strong>del<\/strong> permet de supprimer un \u00e9l\u00e9ment d\u2019index <strong>i<\/strong> d\u2019une liste :<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1883\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist14.png\" alt=\"\" width=\"196\" height=\"65\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. Les expressions d\u2019indi\u00e7age des chaines de caract\u00e8res s\u2019appliquent aussi aux listes&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1884\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist15.png\" alt=\"\" width=\"198\" height=\"178\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. La m\u00e9thode <strong>split() <\/strong>permet de transformer une chaine de caract\u00e8re en liste&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1885\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist16-300x57.png\" alt=\"\" width=\"348\" height=\"66\" srcset=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist16-300x57.png 300w, https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist16.png 326w\" sizes=\"auto, (max-width: 348px) 100vw, 348px\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. La m\u00e9thode <strong>join()<\/strong> permet de transformer une liste de chaine en une chaine de caract\u00e8re&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1889\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist17.png\" alt=\"\" width=\"201\" height=\"46\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. En plus de la m\u00e9thode <strong>count()<\/strong>, on peut \u00e9galement savoir si un \u00e9l\u00e9ment est dans une liste, en utilisant le mot cl\u00e9 <strong>in<\/strong> de cette mani\u00e8re:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1890\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist18.png\" alt=\"\" width=\"194\" height=\"79\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. A la place de la m\u00e9thode <strong>extend()<\/strong> , on peut additionner deux listes pour les combiner ensemble en utilisant l&rsquo;op\u00e9rateur <strong>+<\/strong> :<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1891\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist19.png\" alt=\"\" width=\"263\" height=\"82\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. Il est \u00e9galement possible de multiplier des listes&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1892\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist20-300x47.png\" alt=\"\" width=\"402\" height=\"63\" srcset=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist20-300x47.png 300w, https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist20.png 403w\" sizes=\"auto, (max-width: 402px) 100vw, 402px\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p style=\"padding-left: 40px;\">ce qui est pratique pour initialiser une liste&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1893\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist21.png\" alt=\"\" width=\"123\" height=\"49\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. La fonction <strong>range()<\/strong> g\u00e9n\u00e8re une liste compos\u00e9e d&rsquo;une simple suite arithm\u00e9tique&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1894\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist22.png\" alt=\"\" width=\"161\" height=\"49\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p style=\"padding-left: 40px;\">&#8211; La fonction <strong>list()<\/strong> cr\u00e9e une liste (\u00e0 partir d\u2019une chaine, d\u2019un tuple ou d\u2019une liste)&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1895\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist23.png\" alt=\"\" width=\"196\" height=\"82\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p style=\"padding-left: 40px;\">&#8211; On peut pr\u00e9ciser l\u2019entier de d\u00e9part ( <strong>range(entier de d\u00e9part inclus,<\/strong> <strong>entier de fin exclu) <\/strong>)&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1896\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist24.png\" alt=\"\" width=\"187\" height=\"46\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p style=\"padding-left: 40px;\">&#8211; Et l\u2019incr\u00e9ment&nbsp;( <strong>range(entier de d\u00e9part inclus,<\/strong> <strong>entier de fin exclu, incr\u00e9ment) <\/strong>)&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1901\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist25.png\" alt=\"\" width=\"206\" height=\"47\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. Pour afficher les \u00e9l\u00e9ments d\u2019une liste on peut aussi utiliser une boucle <strong>For<\/strong>&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1902\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist26.png\" alt=\"\" width=\"261\" height=\"165\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>. La fonction <strong>enumerate<\/strong>() permet en plus de r\u00e9cup\u00e9rer l&rsquo;index de l\u2019\u00e9l\u00e9ment&nbsp;:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 70px;\">\n<tbody>\n<tr style=\"height: 70px;\">\n<td style=\"height: 70px; padding-left: 40px;\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1903\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist27-300x97.png\" alt=\"\" width=\"334\" height=\"108\" srcset=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist27-300x97.png 300w, https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonlist27.png 347w\" sizes=\"auto, (max-width: 334px) 100vw, 334px\" \/><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n\n\n<div  class=\"grids-section grids-is-stretch\" style=\"--_gs-gap-desktop:0px 0px;--_gs-m-desktop:0 0 0 0;--_gs-p-desktop:0 0 0 0;--_gs-bg-desktop:transparent none;--_gs-bg-xp-desktop:0px;--_gs-zi-desktop:auto;--_gs-d-desktop:block;--_gs-mw-desktop:calc(100% - 0 - 0);--_gs-gap-tablet:0px 0px;--_gs-m-tablet:0 0 0 0;--_gs-p-tablet:0 0 0 0;--_gs-bg-tablet:transparent none;--_gs-bg-xp-tablet:0px;--_gs-zi-tablet:auto;--_gs-d-tablet:block;--_gs-mw-tablet:calc(100% - 0 - 0);--_gs-gap-mobile:0px 0px;--_gs-m-mobile:0 0 0 0;--_gs-p-mobile:0 0 0 0;--_gs-bg-mobile:transparent none;--_gs-bg-xp-mobile:0px;--_gs-zi-mobile:auto;--_gs-d-mobile:block;--_gs-mw-mobile:calc(100% - 0 - 0);--_gs-columns:2;--_gs-rows:1\"><div class=\"grids-s-w_i\">\n<div class=\"grids-area\" style=\"--_ga-column:1\/2;--_ga-row:1\/2;--_ga-m-desktop:0 0 0 0;--_ga-p-desktop:0 0 0 0;--_ga-bg-desktop:transparent none;--_ga-zi-desktop:auto;--_ga-d-desktop:flex;--_ga-mw-desktop:calc(100% - 0 - 0);--_ga-m-tablet:0 0 0 0;--_ga-p-tablet:0 0 0 0;--_ga-bg-tablet:transparent none;--_ga-zi-tablet:auto;--_ga-d-tablet:flex;--_ga-mw-tablet:calc(100% - 0 - 0);--_ga-m-mobile:0 0 0 0;--_ga-p-mobile:0 0 0 0;--_ga-bg-mobile:transparent none;--_ga-zi-mobile:auto;--_ga-d-mobile:flex;--_ga-mw-mobile:calc(100% - 0 - 0)\">\n\n<div class=\"wp-block-image\"><figure class=\"alignleft size-large\"><a href=\"https:\/\/www.ardpylab.fr\/?page_id=1812\"><img loading=\"lazy\" decoding=\"async\" width=\"50\" height=\"28\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/03\/moins.jpg\" alt=\"\" class=\"wp-image-107\"\/><\/a><\/figure><\/div>\n\n<\/div>\n\n<div class=\"grids-area\" style=\"--_ga-column:2\/3;--_ga-row:1\/2;--_ga-m-desktop:0 0 0 0;--_ga-p-desktop:0 0 0 0;--_ga-bg-desktop:transparent none;--_ga-zi-desktop:auto;--_ga-d-desktop:flex;--_ga-mw-desktop:calc(100% - 0 - 0);--_ga-m-tablet:0 0 0 0;--_ga-p-tablet:0 0 0 0;--_ga-bg-tablet:transparent none;--_ga-zi-tablet:auto;--_ga-d-tablet:flex;--_ga-mw-tablet:calc(100% - 0 - 0);--_ga-m-mobile:0 0 0 0;--_ga-p-mobile:0 0 0 0;--_ga-bg-mobile:transparent none;--_ga-zi-mobile:auto;--_ga-d-mobile:flex;--_ga-mw-mobile:calc(100% - 0 - 0)\">\n\n<div class=\"wp-block-image\"><figure class=\"alignright size-large\"><a href=\"https:\/\/www.ardpylab.fr\/?page_id=1911\"><img loading=\"lazy\" decoding=\"async\" width=\"50\" height=\"28\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/03\/plus.jpg\" alt=\"\" class=\"wp-image-106\"\/><\/a><\/figure><\/div>\n\n<\/div>\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>En python, les listes sont des variables qui peuvent contenir n\u2019importe quel type de donn\u00e9es. Elles sont not\u00e9es sous forme d\u2019\u00e9l\u00e9ments entre crochets s\u00e9par\u00e9s par des virgules. La num\u00e9rotation des \u00e9l\u00e9ments des listes commence \u00e0 0. Les listes correspondent \u00e0 des objets auxquels, il est possible d\u2019appliquer des m\u00e9thodes&nbsp;: . len() renvoie le nombre d\u2019\u00e9l\u00e9ments [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1862","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=\/wp\/v2\/pages\/1862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1862"}],"version-history":[{"count":1,"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=\/wp\/v2\/pages\/1862\/revisions"}],"predecessor-version":[{"id":5388,"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=\/wp\/v2\/pages\/1862\/revisions\/5388"}],"wp:attachment":[{"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}