{"id":37985,"date":"2016-10-11T09:45:21","date_gmt":"2016-10-11T14:45:21","guid":{"rendered":"http:\/\/crzslzr.wordpress.com\/?p=193"},"modified":"2016-10-11T09:45:21","modified_gmt":"2016-10-11T14:45:21","slug":"lists-tuples","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/lists-tuples\/","title":{"rendered":"Lists &amp; Tuples"},"content":{"rendered":"<p class=\"syndicated-attribution\"><em> --Originally published at <a href=\"https:\/\/crzslzr.wordpress.com\/2016\/10\/11\/lists-tuples\/\"><a href=\"https:\/\/crzslzr.wordpress.com\">Python &amp;amp; pugs<\/a><\/a><\/em><br \/><\/p>\n<p>This is a very easy topic and I&#8217;ll explain it in a very easy way.<\/p>\n<p>To identify a list and a tuple just look at this example:<\/p>\n<p><img class=\" size-full wp-image-196 aligncenter\" src=\"https:\/\/crzslzr.files.wordpress.com\/2016\/10\/liststuples.png?w=730\" alt=\"liststuples\"   \/><\/p>\n<p>A tuple can be write withouth the &#8220;[&#8221; &#8220;]&#8221;, and also you can use &#8220;(&#8221; &#8220;)&#8221;, so it is the same if you write:<br \/>\nx = 1,2,3,4<\/p>\n<p>or<\/p>\n<p>x = (1,2,3,4)<\/p>\n<p>But for lists you&#8217;ll need to write it with &#8220;[&#8221; &#8220;]&#8221;<\/p>\n<p>y = [5,6,7,8]<\/p>\n<p>And now, you can use these lists and tuples in several ways, but I&#8217;m going to show the easiest way to use them, and we are going to ask for a number in a certain for position, and for this you need to know that python starts counting from 0.<\/p>\n<p><img class=\" size-full wp-image-204 aligncenter\" src=\"https:\/\/crzslzr.files.wordpress.com\/2016\/10\/liststuples2.png?w=730\" alt=\"liststuples2\"   \/><img class=\" size-full wp-image-206 aligncenter\" src=\"https:\/\/crzslzr.files.wordpress.com\/2016\/10\/liststuples3.png?w=730\" alt=\"liststuples3\"   \/><\/p><br \/>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/crzslzr.wordpress.com\/193\/\"><img alt=\"\" border=\"0\" src=\"http:\/\/feeds.wordpress.com\/1.0\/comments\/crzslzr.wordpress.com\/193\/\" \/><\/a> <img alt=\"\" border=\"0\" src=\"https:\/\/pixel.wp.com\/b.gif?host=crzslzr.wordpress.com&#038;blog=115242027&%23038;post=193&%23038;subd=crzslzr&%23038;ref=&%23038;feed=1\" width=\"1\" height=\"1\" \/>","protected":false},"excerpt":{"rendered":"<p>&#8211;Originally published at Python &amp;amp; pugs This is a very easy topic and I&#8217;ll explain it in a very easy way. To identify a list and a tuple just look at this example: A tuple can be write withouth the &#8220;[&#8221; &#8220;]&#8221;, and also you can use &#8220;(&#8221; &#8220;)&#8221;, so it is the same if &hellip; <a href=\"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/lists-tuples\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Lists &amp; Tuples<\/span><\/a><\/p>\n","protected":false},"author":24,"featured_media":196,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[96,26,97],"class_list":["post-37985","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-lists","tag-sin-categoria","tag-tuples"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/37985","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\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/comments?post=37985"}],"version-history":[{"count":15,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/37985\/revisions"}],"predecessor-version":[{"id":43043,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/37985\/revisions\/43043"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/media?parent=37985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/categories?post=37985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/tags?post=37985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}