{"id":174,"date":"2019-02-05T01:02:04","date_gmt":"2019-02-05T01:02:04","guid":{"rendered":"https:\/\/www.kindsonthegenius.com\/python\/?p=174"},"modified":"2020-07-26T09:08:58","modified_gmt":"2020-07-26T09:08:58","slug":"11-python-tuples","status":"publish","type":"post","link":"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/","title":{"rendered":"Python &#8211; Tuples"},"content":{"rendered":"<p>Similar to <a href=\"https:\/\/www.kindsonthegenius.com\/python\/python-lists\/\">Lists<\/a>, a Tuple is a sequence of objects. However, the difference is that tuples are immutable. This means that you cannot change the value of elements in a Tuple. Another difference between a tuple and a list is that you create a tuple using rounded braces ( ). But you create a list using square braces [ ].<\/p>\n<p>&nbsp;<\/p>\n<p>We would then cover the following<\/p>\n<ol>\n<li><a href=\"#t1\">Creating a Tuple<\/a><\/li>\n<li><a href=\"#t2\">Accessing Elements of a Tuple<\/a><\/li>\n<li><a href=\"#t3\">Trying to Modify a Tuple<\/a><\/li>\n<li><a href=\"#t4\">Basic Tuple Operations<\/a><\/li>\n<li><a href=\"#t5\">Indexing and Slicing in a Tuple<\/a><\/li>\n<li><a href=\"#t6\">Tuple Functions<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t1\">1. Creating a New Tuple<\/strong><\/h4>\n<p>The interesting thing is that if you can use lists, then you can use tuples as well. To create a new tuple, simply use square braces and specify the list of items inside. Then assign it to a variable.<\/p>\n<p>For example, the code below creates 3 tuples.<\/p>\n<p>&nbsp;<\/p>\n<pre style=\"margin: 0; line-height: 125%;\">tupNames <span style=\"color: #333333;\">=<\/span> (<span style=\"background-color: #fff0f0;\">\"Osoo\"<\/span>, <span style=\"background-color: #fff0f0;\">\"Adii\"<\/span>, <span style=\"background-color: #fff0f0;\">\"Jackie\"<\/span> <span style=\"background-color: #fff0f0;\">\"Ottie\"<\/span>, <span style=\"background-color: #fff0f0;\">\"Haty\"<\/span>, <span style=\"background-color: #fff0f0;\">\"Kany\"<\/span>)\r\ntupScores <span style=\"color: #333333;\">=<\/span> (<span style=\"color: #0000dd; font-weight: bold;\">34<\/span>, <span style=\"color: #0000dd; font-weight: bold;\">56<\/span>, <span style=\"color: #0000dd; font-weight: bold;\">98<\/span>, <span style=\"color: #0000dd; font-weight: bold;\">78<\/span>, <span style=\"color: #0000dd; font-weight: bold;\">84<\/span>, <span style=\"color: #6600ee; font-weight: bold;\">99.9<\/span>)\r\nmytup <span style=\"color: #333333;\">=<\/span> (<span style=\"background-color: #fff0f0;\">\"A\"<\/span>, <span style=\"color: #0000dd; font-weight: bold;\">38<\/span>, <span style=\"background-color: #fff0f0;\">\"Budapest\"<\/span>, <span style=\"background-color: #fff0f0;\">\"2018\"<\/span>, <span style=\"background-color: #fff0f0;\">\"Hungary\"<\/span>)\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Notice that a tuple can contain a mixture of different data type. As you can see in the last tuple.<br \/>\nAlso, you can create an empty tuple. You do this using just a pair of braces with nothing inside. This is shown below<br \/>\n<!-- HTML generated using hilite.me --><\/p>\n<p>&nbsp;<\/p>\n<pre style=\"margin: 0; line-height: 125%;\">tup3 <span style=\"color: #333333;\">=<\/span> ()\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Then you can create a tuple with a single element. To do that, you must include comma after the element even is there is just one element.<\/p>\n<p>This is shown below<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<pre style=\"margin: 0; line-height: 125%;\">tup2 <span style=\"color: #333333;\">=<\/span> (<span style=\"color: #0000dd; font-weight: bold;\">34<\/span>,)\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t2\">2. Accessing Elements of a Tuples<\/strong><\/h4>\n<p>You can access individual elements in a list. You do this using the indexes. The index helps you access the value of the element in that index.<\/p>\n<p>For example<\/p>\n<p>Using the lists we created above:<\/p>\n<ul>\n<li>tupnames[0] would give Osoo<\/li>\n<li>tupnames[2] would give Jackie<\/li>\n<li>tupscores[4] would give 84<\/li>\n<\/ul>\n<p>I recommend you try these yourself.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t3\">3. Trying to Modify a Tuple<\/strong><\/h4>\n<p>This is where tuples differ from list. So you cannot really modify the elements of a tuple. Why? Because a tuple is immutable. Therefore the code below would result in an error. Notice that this is true even if you are trying to assign the same value to the same element.<\/p>\n<p>&nbsp;<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<pre style=\"margin: 0; line-height: 125%;\">tupNames[<span style=\"color: #0000dd; font-weight: bold;\">0<\/span>] <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"Osondu Mills\"<\/span>\r\ntupNames[<span style=\"color: #0000dd; font-weight: bold;\">1<\/span>] <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"Adii\"<\/span>\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Also, you cannot delete an element from a tuple. However, you can delete the entire tuple using the del command. Watch the video to see how it it used.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t4\">4. Basic Tuple Operations<\/strong><\/h4>\n<p>Just like lists, tuples support the + and the * operators. You use the + operator (concatenation) to combine two tuples. Then the * operator (repetition) is used to repeat a tuple a given number of times. The table below shows the basic operations that can be performed in a tuple<\/p>\n<p>&nbsp;<\/p>\n<table class=\"table table-bordered\" align=\"center\">\n<tbody>\n<tr>\n<th>Python statement<\/th>\n<th>output<\/th>\n<th>description<\/th>\n<\/tr>\n<tr>\n<td>len([1, 2, 3])<\/td>\n<td>3<\/td>\n<td>Length<\/td>\n<\/tr>\n<tr>\n<td>[2, 3, 4] + [5, 6, 7]<\/td>\n<td>[2, 3, 4, 5, 6, 7]<\/td>\n<td>Concatenation<\/td>\n<\/tr>\n<tr>\n<td>[\u2018Kedu\u2019] * 2<\/td>\n<td>[\u2018Kedu\u2019, \u2018Kedu\u2019]<\/td>\n<td>Repetition<\/td>\n<\/tr>\n<tr>\n<td>10 in [10, 20, 30]<\/td>\n<td>True<\/td>\n<td>Membership<\/td>\n<\/tr>\n<tr>\n<td>for x in [10, 20, 30]: print x,<\/td>\n<td>10 20 30<\/td>\n<td>Iteration<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t5\">5. Indexing, Slicing and Matrices in Tuples<\/strong><\/h4>\n<p>Indexing and slicing work the same way like in lists. Note that slicing means getting a section of a list. Matrices applies to 2-dimensional lists covered in another lesson.<\/p>\n<p>The table below shows how slicing and indexing works in tuples.<\/p>\n<p>For example, if we have the list below:<\/p>\n<pre>places = [\"Enugu\", \"Owerri\", \"London\", \"Lagos\"]\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Then the table below shows how you can perform indexing and slicing operations<\/p>\n<table class=\"table table-bordered\" align=\"center\">\n<tbody>\n<tr>\n<th>Python statement<\/th>\n<th>Output<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>places[2]<\/td>\n<td>London<\/td>\n<td>Offsets start from zero<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">places[-2]<\/td>\n<td class=\"ts\">London<\/td>\n<td>Negative: count from right<\/td>\n<\/tr>\n<tr>\n<td>places[1:]<\/td>\n<td>[\u2018Owerri\u2019, \u2018London\u2019, \u2018Lagos\u2019]<\/td>\n<td>Slicing gets\u00a0 a section<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t6\">6. Tuple Function<\/strong><\/h4>\n<p>Tuples include a number of functions that can help you perform various operations. You can find these functions in the table below.<\/p>\n<p>&nbsp;<\/p>\n<table class=\"table table-bordered\" align=\"center\">\n<tbody>\n<tr style=\"background-color: #f7f6f3;\">\n<th>SN<\/th>\n<th>Function and brief description<\/th>\n<\/tr>\n<tr>\n<td class=\"ts\">1<\/td>\n<td><strong>cmp(tuple1, tuple2)<\/strong>: This is no longer available in Python 3<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">2<\/td>\n<td><strong>len(tuple):\u00a0<\/strong>Returns the total length of the tuple. That is number of elements in a tuple<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">3<\/td>\n<td><strong>max(tuple):\u00a0<\/strong>Returns item from the tuple with max value( i.e largest element)<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">4<\/td>\n<td><strong>min(tuple):\u00a0<\/strong>Returns item from the tuple with min value (smallest element)<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">5<\/td>\n<td><strong>tuple(seq):\u00a0<\/strong>Converts from a list into tuple.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Similar to Lists, a Tuple is a sequence of objects. However, the difference is that tuples are immutable. This means that you cannot change the &hellip; <\/p>\n","protected":false},"author":395,"featured_media":177,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-174","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python - Tuples - Python Tutorials<\/title>\n<meta name=\"description\" content=\"This lesson covers Python tuples. How to create a tuple, accessing elements in a tuple. trying to modify a tuple, basic operations and tuple functions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python - Tuples - Python Tutorials\" \/>\n<meta property=\"og:description\" content=\"This lesson covers Python tuples. How to create a tuple, accessing elements in a tuple. trying to modify a tuple, basic operations and tuple functions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2019-02-05T01:02:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-07-26T09:08:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.kindsonthegenius.com\/python\/wp-content\/uploads\/sites\/8\/2019\/02\/Python-Tuples.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1005\" \/>\n\t<meta property=\"og:image:height\" content=\"574\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"kindsonthegenius\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"kindsonthegenius\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/11-python-tuples\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/11-python-tuples\\\/\"},\"author\":{\"name\":\"kindsonthegenius\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/#\\\/schema\\\/person\\\/63a68934672db675ff0cd80d066510c2\"},\"headline\":\"Python &#8211; Tuples\",\"datePublished\":\"2019-02-05T01:02:04+00:00\",\"dateModified\":\"2020-07-26T09:08:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/11-python-tuples\\\/\"},\"wordCount\":630,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/11-python-tuples\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/wp-content\\\/uploads\\\/sites\\\/8\\\/2019\\\/02\\\/Python-Tuples.jpg\",\"articleSection\":[\"Python Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/11-python-tuples\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/11-python-tuples\\\/\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/11-python-tuples\\\/\",\"name\":\"Python - Tuples - Python Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/11-python-tuples\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/11-python-tuples\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/wp-content\\\/uploads\\\/sites\\\/8\\\/2019\\\/02\\\/Python-Tuples.jpg\",\"datePublished\":\"2019-02-05T01:02:04+00:00\",\"dateModified\":\"2020-07-26T09:08:58+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/#\\\/schema\\\/person\\\/63a68934672db675ff0cd80d066510c2\"},\"description\":\"This lesson covers Python tuples. How to create a tuple, accessing elements in a tuple. trying to modify a tuple, basic operations and tuple functions.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/11-python-tuples\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/11-python-tuples\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/11-python-tuples\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/wp-content\\\/uploads\\\/sites\\\/8\\\/2019\\\/02\\\/Python-Tuples.jpg\",\"contentUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/wp-content\\\/uploads\\\/sites\\\/8\\\/2019\\\/02\\\/Python-Tuples.jpg\",\"width\":1005,\"height\":574,\"caption\":\"Python Tuples\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/11-python-tuples\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python &#8211; Tuples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/#website\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/\",\"name\":\"Python Tutorials\",\"description\":\"Python Tutorial for Programming and Data Science\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/#\\\/schema\\\/person\\\/63a68934672db675ff0cd80d066510c2\",\"name\":\"kindsonthegenius\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g\",\"caption\":\"kindsonthegenius\"},\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/python\\\/author\\\/kindsonthegenius-2\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python - Tuples - Python Tutorials","description":"This lesson covers Python tuples. How to create a tuple, accessing elements in a tuple. trying to modify a tuple, basic operations and tuple functions.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/","og_locale":"en_US","og_type":"article","og_title":"Python - Tuples - Python Tutorials","og_description":"This lesson covers Python tuples. How to create a tuple, accessing elements in a tuple. trying to modify a tuple, basic operations and tuple functions.","og_url":"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/","og_site_name":"Python Tutorials","article_published_time":"2019-02-05T01:02:04+00:00","article_modified_time":"2020-07-26T09:08:58+00:00","og_image":[{"width":1005,"height":574,"url":"https:\/\/www.kindsonthegenius.com\/python\/wp-content\/uploads\/sites\/8\/2019\/02\/Python-Tuples.jpg","type":"image\/jpeg"}],"author":"kindsonthegenius","twitter_card":"summary_large_image","twitter_misc":{"Written by":"kindsonthegenius","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/#article","isPartOf":{"@id":"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/"},"author":{"name":"kindsonthegenius","@id":"https:\/\/www.kindsonthegenius.com\/python\/#\/schema\/person\/63a68934672db675ff0cd80d066510c2"},"headline":"Python &#8211; Tuples","datePublished":"2019-02-05T01:02:04+00:00","dateModified":"2020-07-26T09:08:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/"},"wordCount":630,"commentCount":1,"image":{"@id":"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kindsonthegenius.com\/python\/wp-content\/uploads\/sites\/8\/2019\/02\/Python-Tuples.jpg","articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/","url":"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/","name":"Python - Tuples - Python Tutorials","isPartOf":{"@id":"https:\/\/www.kindsonthegenius.com\/python\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/#primaryimage"},"image":{"@id":"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kindsonthegenius.com\/python\/wp-content\/uploads\/sites\/8\/2019\/02\/Python-Tuples.jpg","datePublished":"2019-02-05T01:02:04+00:00","dateModified":"2020-07-26T09:08:58+00:00","author":{"@id":"https:\/\/www.kindsonthegenius.com\/python\/#\/schema\/person\/63a68934672db675ff0cd80d066510c2"},"description":"This lesson covers Python tuples. How to create a tuple, accessing elements in a tuple. trying to modify a tuple, basic operations and tuple functions.","breadcrumb":{"@id":"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/#primaryimage","url":"https:\/\/www.kindsonthegenius.com\/python\/wp-content\/uploads\/sites\/8\/2019\/02\/Python-Tuples.jpg","contentUrl":"https:\/\/www.kindsonthegenius.com\/python\/wp-content\/uploads\/sites\/8\/2019\/02\/Python-Tuples.jpg","width":1005,"height":574,"caption":"Python Tuples"},{"@type":"BreadcrumbList","@id":"https:\/\/www.kindsonthegenius.com\/python\/11-python-tuples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.kindsonthegenius.com\/python\/"},{"@type":"ListItem","position":2,"name":"Python &#8211; Tuples"}]},{"@type":"WebSite","@id":"https:\/\/www.kindsonthegenius.com\/python\/#website","url":"https:\/\/www.kindsonthegenius.com\/python\/","name":"Python Tutorials","description":"Python Tutorial for Programming and Data Science","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.kindsonthegenius.com\/python\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.kindsonthegenius.com\/python\/#\/schema\/person\/63a68934672db675ff0cd80d066510c2","name":"kindsonthegenius","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g","caption":"kindsonthegenius"},"url":"https:\/\/www.kindsonthegenius.com\/python\/author\/kindsonthegenius-2\/"}]}},"_links":{"self":[{"href":"https:\/\/www.kindsonthegenius.com\/python\/wp-json\/wp\/v2\/posts\/174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kindsonthegenius.com\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kindsonthegenius.com\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/python\/wp-json\/wp\/v2\/users\/395"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/python\/wp-json\/wp\/v2\/comments?post=174"}],"version-history":[{"count":5,"href":"https:\/\/www.kindsonthegenius.com\/python\/wp-json\/wp\/v2\/posts\/174\/revisions"}],"predecessor-version":[{"id":379,"href":"https:\/\/www.kindsonthegenius.com\/python\/wp-json\/wp\/v2\/posts\/174\/revisions\/379"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/python\/wp-json\/wp\/v2\/media\/177"}],"wp:attachment":[{"href":"https:\/\/www.kindsonthegenius.com\/python\/wp-json\/wp\/v2\/media?parent=174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/python\/wp-json\/wp\/v2\/categories?post=174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/python\/wp-json\/wp\/v2\/tags?post=174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}