{"id":39019,"date":"2016-11-22T17:38:53","date_gmt":"2016-11-22T23:38:53","guid":{"rendered":"http:\/\/a01228858.wordpress.com\/?p=287"},"modified":"2016-11-22T17:38:53","modified_gmt":"2016-11-22T23:38:53","slug":"lists-tuples-2","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/lists-tuples-2\/","title":{"rendered":"Lists &amp; Tuples"},"content":{"rendered":"<p class=\"syndicated-attribution\"><em> --Originally published at <a href=\"https:\/\/a01228858.wordpress.com\/2016\/11\/22\/lists-tuples\/\"><a href=\"https:\/\/a01228858.wordpress.com\">Py(t)hon<\/a><\/a><\/em><br \/><\/p>\n<p>It is time for us to learn about lists and tuples, this is a very simple topic. Both are sequence type data, referring to the way they behave, as a sequence. The elements that go inside the list and the tuple can be different kind, a string, a number, even another list or tuple.<\/p>\n<p>The difference between them is that the list is between [ ] and can be modify and the tuple is between parenthesis () and can\u2019t be modify.<\/p>\n<p>An example:<\/p>\n<pre><span class=\"p\">[<\/span><span class=\"mi\">10<\/span><span class=\"p\">,<\/span> <span class=\"mi\">20<\/span><span class=\"p\">,<\/span> <span class=\"mi\">30<\/span><span class=\"p\">,<\/span> <span class=\"mi\">40<\/span><span class=\"p\">,<\/span> <span class=\"mi\">50<\/span><span class=\"p\">]<\/span>\n<span class=\"p\">[<\/span><span class=\"s\">\"spam\"<\/span><span class=\"p\">,<\/span> <span class=\"s\">\"bungee\"<\/span><span class=\"p\">,<\/span> <span class=\"s\">\"swallow\"<\/span><span class=\"p\">]<\/span>\n<span class=\"p\">(<\/span><span class=\"mi\">2<\/span><span class=\"p\">,<\/span> <span class=\"mi\">4<\/span><span class=\"p\">,<\/span> <span class=\"mi\">6<\/span><span class=\"p\">,<\/span> <span class=\"mi\">8<\/span><span class=\"p\">)<\/span>\n<span class=\"p\">(<\/span><span class=\"s\">\"two\"<\/span><span class=\"p\">,<\/span> <span class=\"s\">\"four\"<\/span><span class=\"p\">,<\/span> <span class=\"s\">\"six\"<\/span><span class=\"p\">,<\/span> <span class=\"s\">\"eight\"<\/span><span class=\"p\">)<\/span>\n<span class=\"p\">[(<\/span><span class=\"s\">\"cheese\"<\/span><span class=\"p\">,<\/span> <span class=\"s\">\"queso\"<\/span><span class=\"p\">),<\/span> <span class=\"p\">(<\/span><span class=\"s\">\"red\"<\/span><span class=\"p\">,<\/span> <span class=\"s\">\"rojo\"<\/span><span class=\"p\">),<\/span> <span class=\"p\">(<\/span><span class=\"s\">\"school\"<\/span><span class=\"p\">,<\/span> <span class=\"s\">\"escuela\"<\/span><span class=\"p\">)]<\/span><\/pre>\n<p>Here is a video for better understanding:<\/p>\n<div class=\"jetpack-video-wrapper\"><iframe class='youtube-player' type='text\/html' width='1000' height='593' src='https:\/\/www.youtube.com\/embed\/RVXIBZvg-W8?version=3&#038;rel=1&%23038;fs=1&%23038;autohide=2&%23038;showsearch=0&%23038;showinfo=1&%23038;iv_load_policy=1&%23038;wmode=transparent' allowfullscreen='true' style='border:0;'><\/iframe><\/div>\n<p>That&#8217;s all<img src=\"https:\/\/s0.wp.com\/wp-content\/mu-plugins\/wpcom-smileys\/twemoji\/2\/72x72\/1f600.png\" alt=\"?\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> #Pug#Lists&amp;Tuples #ISC#TC101#Tec<\/p><br \/>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/a01228858.wordpress.com\/287\/\"><img alt=\"\" border=\"0\" src=\"http:\/\/feeds.wordpress.com\/1.0\/comments\/a01228858.wordpress.com\/287\/\" \/><\/a> <img alt=\"\" border=\"0\" src=\"https:\/\/pixel.wp.com\/b.gif?host=a01228858.wordpress.com&#038;blog=115152340&%23038;post=287&%23038;subd=a01228858&%23038;ref=&%23038;feed=1\" width=\"1\" height=\"1\" \/>","protected":false},"excerpt":{"rendered":"<p>&#8211;Originally published at Py(t)hon It is time for us to learn about lists and tuples, this is a very simple topic. Both are sequence type data, referring to the way they behave, as a sequence. The elements that go inside the list and the tuple can be different kind, a string, a number, even another &hellip; <a href=\"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/lists-tuples-2\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Lists &amp; Tuples<\/span><\/a><\/p>\n","protected":false},"author":28,"featured_media":39020,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[34,377,42,33,36],"class_list":["post-39019","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-isc","tag-liststuples","tag-pug","tag-tc101","tag-tec"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/39019","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/comments?post=39019"}],"version-history":[{"count":12,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/39019\/revisions"}],"predecessor-version":[{"id":42588,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/39019\/revisions\/42588"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/media\/39020"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/media?parent=39019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/categories?post=39019"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/tags?post=39019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}