{"id":1789,"date":"2020-04-11T10:21:33","date_gmt":"2020-04-11T08:21:33","guid":{"rendered":"http:\/\/www.ardpylab.fr\/?page_id=1789"},"modified":"2020-05-10T15:11:35","modified_gmt":"2020-05-10T13:11:35","slug":"variables-et-affectation","status":"publish","type":"page","link":"https:\/\/www.ardpylab.fr\/?page_id=1789","title":{"rendered":"Variables et affectation"},"content":{"rendered":"\n<h4>&nbsp;<\/h4>\n<p>Comme tout langage, Python permet de manipuler des donn\u00e9es gr\u00e2ce \u00e0 un vocabulaire de mots r\u00e9serv\u00e9es et gr\u00e2ce \u00e0 des types de donn\u00e9es. Il utilise des identifiants pour nommer ses objets.<\/p>\n<p>Un identifiant Python valide est une suite non vide de caract\u00e8res, de longueur quelconque, form\u00e9e d&rsquo;un caract\u00e8re de d\u00e9but et de z\u00e9ro ou plusieurs caract\u00e8res de continuation, sachant que :<\/p>\n<p>&#8211; un caract\u00e8re de d\u00e9but peut \u00eatre n&rsquo;importe quelle lettre,<br>&#8211; un caract\u00e8re de continuation est un caract\u00e8re de d\u00e9but, un chiffre ou un point.<br><br><\/p>\n<p><u>Attention<\/u>&nbsp;:<\/p>\n<p>Les identifiants sont sensibles \u00e0 la casse (majuscules ou minuscules) et ne doivent pas \u00eatre un mot cl\u00e9&nbsp;r\u00e9serv\u00e9 de Python tel que :<\/p>\n<p><strong>and; del; from; None; True; as; elif; global; nonlocal; try; assert; else; if; not; while; break; except; import; or; with; class; False; in; pass; yield; continue; finally; is; raise; def; for; lambda; return.<\/strong><\/p>\n<p>&nbsp;<\/p>\n\n\n\n<h4><span style=\"color: #0000ff;\"><strong><a id=\"var1\"><\/a>. <u>Les principaux types de donn\u00e9es<\/u><\/strong><\/span><\/h4>\n<p>Il existe diff\u00e9rents types de donn\u00e9es : le type entier (int), le type nombre \u00e0 virgule (float), le type Bool\u00e9en (bool), le type cha\u00eene de caract\u00e8res (str), \u2026<br><br><\/p>\n<p><strong><a id=\"var2\"><\/a>&#8211; Le type int&nbsp;:<\/strong><\/p>\n<p>Il repr\u00e9sente les nombres entiers. Le type <strong>int<\/strong> n&rsquo;est limit\u00e9 en taille que par la m\u00e9moire de la machine.<\/p>\n<p>Les entiers sont d\u00e9cimaux par d\u00e9faut, mais on peut aussi utiliser les bases binaire, octale ou hexad\u00e9cimale.<\/p>\n<p>On peut effectuer les op\u00e9rations arithm\u00e9tiques classiques avec des donn\u00e9es de type <strong>int&nbsp;:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 39px;\">\n<tbody>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding-left: 40px;\" bgcolor=\"#FFFFCC\">\n<p><span style=\"color: #000000;\">20 + 3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #808080;\"># 23<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">20 &#8211; 3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #808080;\"># 17<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">20 * 3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #808080;\"># 60<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">20 ** 3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #808080;\"># 8000<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">20 \/ 3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #808080;\"># 6.666666666666667<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">20 \/\/ 3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #808080;\"># 6 &nbsp;&nbsp;&nbsp;(division enti\u00e8re)<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">20 % 3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #808080;\"># 2&nbsp;&nbsp;&nbsp;&nbsp; (modulo)<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">abs(3 &#8211; 20) &nbsp;&nbsp;<span style=\"color: #808080;\"># 17&nbsp;&nbsp; (valeur absolue)<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>&nbsp;<\/p>\n<p><strong><a id=\"var3\"><\/a>&#8211; Le type float&nbsp;:<\/strong><\/p>\n<p>Un float est un nombre d\u00e9cimal \u00e0 virgule not\u00e9 avec un point d\u00e9cimal ou en notation exponentielle :<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 21px;\">\n<tbody>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding-left: 40px;\" bgcolor=\"#FFFFCC\">\n<p>2.718<\/p>\n<p>.02<\/p>\n<p>3e8<\/p>\n<p>6.023e23<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>Les flottants supportent les m\u00eames op\u00e9rations que les entiers.<\/p>\n<p>L&rsquo;import du module math autorise toutes les op\u00e9rations math\u00e9matiques usuelles :<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 39px;\">\n<tbody>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding-left: 40px;\" bgcolor=\"#FFFFCC\">\n<p><span style=\"color: #000000;\">import math<\/span><\/p>\n<p><span style=\"color: #000000;\">print(math.sin(math.pi\/4)) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #808080;\"># 0.7071067811865475<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">print(math.degrees(math.pi)) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #808080;\"># 180.0<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">print(math.factorial(9))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<span style=\"color: #808080;\"># 362880<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">print(math.log(1024, 2)) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #808080;\"># 10.0<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>&nbsp;<\/p>\n<p><strong><a id=\"var4\"><\/a>&#8211; &nbsp;Le type bool&nbsp;:<\/strong><\/p>\n<p>Une donn\u00e9e de type bool \u00e0 deux valeurs possibles : <strong><span style=\"color: #000000;\">False<\/span><\/strong> et <strong><span style=\"color: #000000;\">True.<\/span><\/strong><\/p>\n<p>Les op\u00e9rations logiques et de comparaisons sont \u00e9valu\u00e9es afin de donner des r\u00e9sultats bool\u00e9ens False et True&nbsp;:<\/p>\n<p>&#8211; Op\u00e9rateurs de comparaison : <strong>==<\/strong>, <strong>!=<\/strong>, <strong>&gt;<\/strong>, <strong>&gt;=<\/strong>, <strong>&lt; <\/strong>et <strong>&lt;=<\/strong> :<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 20px;\">\n<tbody>\n<tr style=\"height: 21px;\">\n<td style=\"height: 20px; padding-left: 40px;\" bgcolor=\"#FFFFCC\">\n<p><span style=\"color: #000000;\">2 &gt; 8 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #808080;\"># False<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">2 &lt;= 8 &lt; 15 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #808080;\"># True<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>&#8211; Op\u00e9rateurs logiques: <strong>not<\/strong>, <strong>or<\/strong> et <strong>and<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 21px;\">\n<tbody>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding-left: 40px;\" bgcolor=\"#FFFFCC\">\n<p><span style=\"color: #000000;\">(3 == 3) or (9 &gt; 24) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #808080;\"># True<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">(9 &gt; 24) and (3 == 3) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #808080;\"># False <\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>&nbsp;<\/p>\n<p><strong><a id=\"var5\"><\/a>&#8211; &nbsp;Le type str&nbsp;:<\/strong><\/p>\n<p>Le type de donn\u00e9es <strong>str<\/strong> repr\u00e9sente une s\u00e9quence de caract\u00e8res entre guillemets simple (apostrophes) <strong>&lsquo;<\/strong> ou double <strong>\u201d<\/strong> ce qui permet d&rsquo;inclure une notation dans l&rsquo;autre :<\/p>\n<p style=\"padding-left: 40px;\">. guillemets = \u201d L&rsquo;eau vive \u201d<\/p>\n<p style=\"padding-left: 40px;\">. apostrophes = &lsquo; Forme \u201davec des apostrophes\u201d &lsquo;<\/p>\n<p>&nbsp;<\/p>\n\n\n\n<h4><span style=\"color: #0000ff;\"><strong><a id=\"var6\"><\/a>. <u>Les variables<br><br><\/u><\/strong><\/span><\/h4>\n<p>On utilise les variables pour stocker des donn\u00e9es. Une variable est un identifiant associ\u00e9 \u00e0 une valeur. Informatiquement, c&rsquo;est une r\u00e9f\u00e9rence d&rsquo;objet situ\u00e9e \u00e0 une adresse m\u00e9moire.<\/p>\n<p>On affecte une variable par une valeur en utilisant le signe = (qui n&rsquo;a rien \u00e0 voir avec l&rsquo;\u00e9galit\u00e9 en math !). Dans une affectation, le membre de gauche re\u00e7oit le membre de droite ce qui n\u00e9cessite d&rsquo;\u00e9valuer la valeur correspondant au membre de droite avant de l&rsquo;affecter au membre de gauche.<\/p>\n<p><u>Exemple en mode interactif<\/u>&nbsp;:<\/p>\n\n\n<figure class=\"wp-block-table\">\n<table>\n<tbody>\n<tr>\n<td style=\"padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1773\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonvar1.png\" alt=\"\" width=\"177\" height=\"81\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<p>. L\u2019ex\u00e9cution de la premi\u00e8re ligne cr\u00e9e une variable nomm\u00e9e pi contenant la valeur r\u00e9elle 3.1415.<\/p>\n<p>. L\u2019ex\u00e9cution de la deuxi\u00e8me ligne cr\u00e9e une variable nomm\u00e9e R contenant la valeur enti\u00e8re 3.<\/p>\n<p>. L\u2019ex\u00e9cution de la troisi\u00e8me ligne cr\u00e9e une variable nomm\u00e9e Adisc contenant le r\u00e9sultat du calcul pi*R\u00b2.<\/p>\n<p>Pour afficher la valeur d\u2019une variable, il suffit de taper son nom puis d\u2019appuyer sur la touche Entr\u00e9e ou bien taper <strong>print(Nom_de_la_variable)<\/strong>&nbsp;:<\/p>\n\n\n<figure class=\"wp-block-table\">\n<table>\n<tbody>\n<tr>\n<td style=\"padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1775\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonvar2.png\" alt=\"\" width=\"173\" height=\"53\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<p>La valeur d&rsquo;une variable, comme son nom l&rsquo;indique, peut \u00e9voluer au cours du temps (la valeur ant\u00e9rieure est perdue) :<\/p>\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 131px;\">\n<tbody>\n<tr style=\"height: 131px;\">\n<td style=\"padding-left: 40px; height: 131px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1777\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonvar3.png\" alt=\"\" width=\"118\" height=\"110\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<p>Ceci est r\u00e9sum\u00e9 dans le sch\u00e9ma suivant, o\u00f9 les cercles repr\u00e9sentent les identificateurs (variables) alors que les rectangles repr\u00e9sentent les donn\u00e9es.<\/p>\n<p>Les affectations relient les identificateurs aux donn\u00e9es : si une donn\u00e9e en m\u00e9moire n&rsquo;est plus reli\u00e9e, le ramasse-miettes (garbage collector) de Python la supprime automatiquement :<\/p>\n\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"644\" height=\"386\" class=\"wp-image-1778 aligncenter\" style=\"border: 3px solid #eeeeee; padding: 3px; margin: 3px;\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonvar4.png\" alt=\"\" srcset=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonvar4.png 644w, https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonvar4-300x180.png 300w\" sizes=\"auto, (max-width: 644px) 100vw, 644px\" \/><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n\n\n\n<p>Outre l&rsquo;affectation simple, on peut aussi utiliser les formes suivantes :<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n<table style=\"width: 100%; height: 39px;\">\n<tbody>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding-left: 40px;\" bgcolor=\"#FFFFCC\">\n<p><span style=\"color: #808080;\"># affectation simple<\/span><br><span style=\"color: #000000;\">v = 4<\/span><\/p>\n<p><span style=\"color: #808080;\"># affectation augment\u00e9e<\/span><br><span style=\"color: #000000;\">v += 2 <span style=\"color: #808080;\"># idem \u00e0 : <span style=\"color: #000000;\">v = v + 2<\/span> si v est d\u00e9j\u00e0 r\u00e9f\u00e9renc\u00e9<\/span><\/span><\/p>\n<p><span style=\"color: #808080;\"># affectation de droite \u00e0 gauche<\/span><br><span style=\"color: #000000;\">c = d = 8 <span style=\"color: #808080;\"># cibles multiples<\/span><\/span><\/p>\n<p><span style=\"color: #808080;\"># affectations parall\u00e8les d&rsquo;une s\u00e9quence<\/span><br><span style=\"color: #000000;\">e, f = 2.7, 5.1 <span style=\"color: #808080;\"># tuple<\/span><\/span><br><span style=\"color: #000000;\">g, h, i = [&lsquo;G&rsquo;, &lsquo;H&rsquo;, &lsquo;I&rsquo;] <span style=\"color: #808080;\"># liste<\/span><\/span><br><span style=\"color: #000000;\">x, y = coordonneesSouris() <span style=\"color: #808080;\"># retour multiple d&rsquo;une fonction<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<p>Avec Python, il n\u2019est pas n\u00e9cessaire de d\u00e9finir pr\u00e9alablement le type de la variable. Le typage se fait automatiquement lors de l\u2019affectation d\u2019une valeur \u00e0 la variable&nbsp;:<\/p>\n<p><u>Exemples<\/u>&nbsp;:<\/p>\n<blockquote>\n<p style=\"padding-left: 40px;\">a=\u00a0\u00bbHello World !\u00a0\u00bb<br>&gt;&gt;&gt; b=3<br><span style=\"font-size: inherit;\">&gt;&gt;&gt; c=2.5<br><\/span><span style=\"font-size: inherit;\">&gt;&gt;&gt; d=[7,3,145]<br><\/span><span style=\"font-size: inherit;\">&gt;&gt;&gt; e=False<br><\/span><span style=\"font-size: inherit;\">&gt;&gt;&gt;<\/span><\/p>\n<\/blockquote>\n<p>&#8211; La variable <strong>a<\/strong> contient une cha\u00eene de caract\u00e8res, elle sera de type str.<\/p>\n<p>D\u00e8s que la valeur d\u2019affection d\u2019une variable est entre guillemets, la variable sera du type \u00ab cha\u00eene de caract\u00e8res \u00bb (<strong>str<\/strong>). Par exemple, si vous saisissez <strong>a=\u201c3\u201c<\/strong> (ou <strong>a=\u20193\u2019<\/strong>), la variable a est du type cha\u00eene de caract\u00e8res et la valeur de <strong>a<\/strong> n\u2019est pas consid\u00e9r\u00e9e comme un nombre mais comme du texte (effectuer l\u2019op\u00e9ration a+2 n\u2019aurait aucun sens !) .<\/p>\n<p>&#8211; La variable <strong>b<\/strong> contient un entier, elle sera de type int.<\/p>\n<p>&#8211; La variable c contient un nombre \u00e0 virgule, elle sera de type float.<\/p>\n<p>&#8211; La variable d contient une liste, elle sera du type list.<\/p>\n<p>&#8211; La variable e contient un bool\u00e9en, elle sera du type bool (une variable de type bool peut prendre 2 valeurs True ou False).<br><br><\/p>\n<p>Pour conna\u00eetre le type d\u2019une variable il suffit de taper type(nom_de_la_variable) :<\/p>\n\n\n<figure class=\"wp-block-table\">\n<table>\n<tbody>\n<tr>\n<td style=\"padding-left: 40px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1785\" src=\"https:\/\/www.ardpylab.fr\/wp-content\/uploads\/2020\/04\/pythonvar5.png\" alt=\"\" width=\"129\" height=\"57\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/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=1734\"><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=1812\"><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>\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Comme tout langage, Python permet de manipuler des donn\u00e9es gr\u00e2ce \u00e0 un vocabulaire de mots r\u00e9serv\u00e9es et gr\u00e2ce \u00e0 des types de donn\u00e9es. Il utilise des identifiants pour nommer ses objets. Un identifiant Python valide est une suite non vide de caract\u00e8res, de longueur quelconque, form\u00e9e d&rsquo;un caract\u00e8re de d\u00e9but et de z\u00e9ro ou [&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-1789","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=\/wp\/v2\/pages\/1789","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=1789"}],"version-history":[{"count":0,"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=\/wp\/v2\/pages\/1789\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ardpylab.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}