{"id":100,"date":"2022-02-08T11:30:31","date_gmt":"2022-02-08T10:30:31","guid":{"rendered":"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/?p=100"},"modified":"2022-02-08T11:55:00","modified_gmt":"2022-02-08T10:55:00","slug":"collection-dobjets-en-python","status":"publish","type":"post","link":"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/2022\/02\/08\/collection-dobjets-en-python\/","title":{"rendered":"Collection d\u2019objets en python"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-content\/uploads\/sites\/13\/2022\/02\/image-2.png\" alt=\"\" class=\"wp-image-104\" width=\"852\" height=\"417\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-content\/uploads\/sites\/13\/2022\/02\/image-2.png 783w, http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-content\/uploads\/sites\/13\/2022\/02\/image-2-300x147.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-content\/uploads\/sites\/13\/2022\/02\/image-2-768x376.png 768w\" sizes=\"(max-width: 852px) 100vw, 852px\" \/><\/figure>\n\n\n\n<h1 class=\"has-text-align-center\"><span class=\"has-inline-color has-vivid-purple-color\">Les Tuples<\/span> <span class=\"has-inline-color has-vivid-purple-color\">:<\/span><\/h1>\n\n\n\n<p><a href=\"https:\/\/colab.research.google.com\/drive\/1tntcCyD5JS2UAXzdkZ-HivsbAPFnj50y#scrollTo=yMzgYuHN6_hg\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/colab.research.google.com\/drive\/1tntcCyD5JS2UAXzdkZ-HivsbAPFnj50y#scrollTo=yMzgYuHN6_hg<\/a><\/p>\n\n\n\n<h3 class=\"has-text-align-center\"><strong><span class=\"has-inline-color has-light-green-cyan-color\">Les tuples sont utilis\u00e9s pour stocker plusieurs \u00e9l\u00e9ments dans une seule variable.<\/span><\/strong><\/h3>\n\n\n\n<h3 class=\"has-text-align-center\"><strong><span class=\"has-inline-color has-light-green-cyan-color\">Tuple est l&#8217;un des 4 types de donn\u00e9es int\u00e9gr\u00e9s \u00e0 Python utilis\u00e9s pour stocker des collections de donn\u00e9es, les 3 autres sont&nbsp;List&nbsp;,&nbsp;Set et&nbsp;Dictionary&nbsp;, tous avec des qualit\u00e9s et une utilisation diff\u00e9rentes.<\/span><\/strong><\/h3>\n\n\n\n<h3 class=\"has-text-align-center\"><strong><span class=\"has-inline-color has-light-green-cyan-color\">Un tuple est une<\/span><\/strong><span class=\"has-inline-color has-light-green-cyan-color\"><strong> collection ordonn\u00e9e et<\/strong>&nbsp;<strong>inchangeable<\/strong>&nbsp;.<\/span><\/h3>\n\n\n\n<h3 class=\"has-text-align-center\"><strong><span class=\"has-inline-color has-light-green-cyan-color\">Les tuples sont \u00e9crits entre parenth\u00e8ses<\/span><\/strong><span class=\"has-inline-color has-light-green-cyan-color\"> <strong>compar\u00e9 au liste et au dictionnaire<\/strong><\/span><\/h3>\n\n\n\n<h3 class=\"has-text-align-center\"><span class=\"has-inline-color has-light-green-cyan-color\"><strong>Les \u00e9l\u00e9ments de tuple sont ordonn\u00e9s, non<\/strong> <strong>modifiables et autorisent<\/strong> <strong>les valeurs en double.<\/strong><\/span><\/h3>\n\n\n\n<h1 class=\"has-text-align-center\"><span class=\"has-inline-color has-vivid-purple-color\">Les Dictionnaires :<\/span><\/h1>\n\n\n\n<h3 class=\"has-text-align-center\"><span class=\"has-inline-color has-light-green-cyan-color\"><strong>Les dictionnaires sont utilis\u00e9s pour stocker des valeurs de<\/strong><\/span><strong><span class=\"has-inline-color has-light-green-cyan-color\"> donn\u00e9es dans des paires cl\u00e9:valeur.<\/span><\/strong><\/h3>\n\n\n\n<h3 class=\"has-text-align-center\"><strong><span class=\"has-inline-color has-light-green-cyan-color\">Un dictionnaire est une collection ordonn\u00e9e*, modifiable et qui n&#8217;autorise pas<\/span> <span class=\"has-inline-color has-light-green-cyan-color\">les doublons.<\/span><\/strong><\/h3>\n\n\n\n<h3 class=\"has-text-align-center\"><strong><span class=\"has-inline-color has-light-green-cyan-color\">Les \u00e9l\u00e9ments du dictionnaire sont pr\u00e9sent\u00e9s dans des paires cl\u00e9:valeur et peuvent \u00eatre r\u00e9f\u00e9renc\u00e9s \u00e0 l&#8217;aide du nom de la cl\u00e9.<\/span><\/strong><\/h3>\n\n\n\n<h2><span class=\"has-inline-color has-vivid-purple-color\">Autre m\u00e9thode pour le travail pr\u00e9liminaire :<\/span><\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"286\" height=\"247\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-content\/uploads\/sites\/13\/2022\/02\/image-3.png\" alt=\"\" class=\"wp-image-109\" \/><\/figure>\n\n\n\n<h3><strong><span class=\"has-inline-color has-light-green-cyan-color\">Le code est disponible \u00e0 la fin dans le lien google colab.<\/span><\/strong><\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Les Tuples : https:\/\/colab.research.google.com\/drive\/1tntcCyD5JS2UAXzdkZ-HivsbAPFnj50y#scrollTo=yMzgYuHN6_hg Les tuples sont utilis\u00e9s pour stocker plusieurs \u00e9l\u00e9ments dans une seule variable. Tuple est l&#8217;un des 4 types de donn\u00e9es int\u00e9gr\u00e9s \u00e0 Python utilis\u00e9s pour stocker des collections de donn\u00e9es, les 3 autres sont&nbsp;List&nbsp;,&nbsp;Set et&nbsp;Dictionary&nbsp;, tous avec des qualit\u00e9s et une utilisation diff\u00e9rentes. Un tuple est une collection ordonn\u00e9e et&nbsp;inchangeable&nbsp;. Les [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-json\/wp\/v2\/posts\/100"}],"collection":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-json\/wp\/v2\/comments?post=100"}],"version-history":[{"count":5,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-json\/wp\/v2\/posts\/100\/revisions"}],"predecessor-version":[{"id":111,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-json\/wp\/v2\/posts\/100\/revisions\/111"}],"wp:attachment":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-json\/wp\/v2\/media?parent=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-json\/wp\/v2\/categories?post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/romain\/wp-json\/wp\/v2\/tags?post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}