{"id":94,"date":"2018-04-29T15:38:19","date_gmt":"2018-04-29T15:38:19","guid":{"rendered":"https:\/\/learnscripting.org\/?p=94"},"modified":"2018-04-29T15:38:19","modified_gmt":"2018-04-29T15:38:19","slug":"looping-in-python","status":"publish","type":"post","link":"https:\/\/learnscripting.org\/looping-in-python\/","title":{"rendered":"Looping in Python"},"content":{"rendered":"<h2>Single Statement Suites<\/h2>\n<p>If the suite of an <b>if<\/b> clause consists only of a single line, it may go on the same line as the header statement.<\/p>\n<p>Here is an example of a <b>one-line if<\/b> clause \u2212<\/p>\n<p><i class=\"fa-external-link\"><\/i> Live Demo<\/p>\n<pre class=\"prettyprint notranslate prettyprinted\"><span class=\"com\">#!\/usr\/bin\/python<\/span>\n\n<span class=\"kwd\">var<\/span> <span class=\"pun\">=<\/span> <span class=\"lit\">100<\/span>\n<span class=\"kwd\">if<\/span> <span class=\"pun\">(<\/span> <span class=\"kwd\">var<\/span> <span class=\"pun\">==<\/span> <span class=\"lit\">100<\/span> <span class=\"pun\">)<\/span> <span class=\"pun\">:<\/span> <span class=\"kwd\">print<\/span> <span class=\"str\">\"Value of expression is 100\"<\/span>\n<span class=\"kwd\">print<\/span> <span class=\"str\">\"Good bye!\"<\/span><\/pre>\n<p>When the above code is executed, it produces the following result \u2212<\/p>\n<pre class=\"result notranslate\">Value of expression is 100\nGood bye!\n<\/pre>\n<p>In general, statements are executed sequentially \u2212 The first statement in a function is executed first, followed by the second, and so on. There may be a situation when you need to execute a block of code several number of times.<\/p>\n<p>Programming languages provide various control structures that allow more complicated execution paths.<\/p>\n<p>A loop statement allows us to execute a statement or group of statements multiple times. The following diagram illustrates a loop statement \u2212<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.tutorialspoint.com\/python3\/images\/loop_architecture.jpg\" alt=\"Loop Architecture\" \/><\/p>\n<p>Python programming language provides the following types of loops to handle looping requirements.<\/p>\n<table class=\"table table-bordered\">\n<tbody>\n<tr>\n<th>S.No.<\/th>\n<th>Loop Type &amp; Description<\/th>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>while loopRepeats a statement or group of statements while a given condition is TRUE. It tests the condition before executing the loop body.<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>for loopExecutes a sequence of statements multiple times and abbreviates the code that manages the loop variable.<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>nested loopsYou can use one or more loop inside any another while, or for loop.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Loop Control Statements<\/h2>\n<p>The Loop control statements change the execution from its normal sequence. When the execution leaves a scope, all automatic objects that were created in that scope are destroyed.<\/p>\n<p>Python supports the following control statements.<\/p>\n<table class=\"table table-bordered\">\n<tbody>\n<tr>\n<th>S.No.<\/th>\n<th>Control Statement &amp; Description<\/th>\n<\/tr>\n<tr>\n<td class=\"ts\">1<\/td>\n<td>break statementTerminates the loop statement and transfers execution to the statement immediately following the loop.<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">2<\/td>\n<td>continue statementCauses the loop to skip the remainder of its body and immediately retest its condition prior to reiterating.<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">3<\/td>\n<td>pass statementThe pass statement in Python is used when a statement is required syntactically but you do not want any command or code to execute.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Let us go through the loop control statements briefly.<\/p>\n<h2>Iterator and Generator<\/h2>\n<p><b>Iterator<\/b> is an object which allows a programmer to traverse through all the elements of a collection, regardless of its specific implementation. In Python, an iterator object implements two methods, <b>iter()<\/b> and <b>next()<\/b>.<\/p>\n<p>String, List or Tuple objects can be used to create an Iterator.<\/p>\n<pre class=\"prettyprint notranslate prettyprinted\"><span class=\"pln\">list <\/span><span class=\"pun\">=<\/span> <span class=\"pun\">[<\/span><span class=\"lit\">1<\/span><span class=\"pun\">,<\/span><span class=\"lit\">2<\/span><span class=\"pun\">,<\/span><span class=\"lit\">3<\/span><span class=\"pun\">,<\/span><span class=\"lit\">4<\/span><span class=\"pun\">]<\/span><span class=\"pln\">\nit <\/span><span class=\"pun\">=<\/span><span class=\"pln\"> iter<\/span><span class=\"pun\">(<\/span><span class=\"pln\">list<\/span><span class=\"pun\">)<\/span> <span class=\"com\"># this builds an iterator object<\/span>\n<span class=\"kwd\">print<\/span> <span class=\"pun\">(<\/span><span class=\"kwd\">next<\/span><span class=\"pun\">(<\/span><span class=\"pln\">it<\/span><span class=\"pun\">))<\/span> <span class=\"com\">#prints next available element in iterator<\/span>\n<span class=\"typ\">Iterator<\/span> <span class=\"kwd\">object<\/span><span class=\"pln\"> can be traversed <\/span><span class=\"kwd\">using<\/span><span class=\"pln\"> regular <\/span><span class=\"kwd\">for<\/span><span class=\"pln\"> statement\n<\/span><span class=\"pun\">!<\/span><span class=\"pln\">usr<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">bin<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">python3\n<\/span><span class=\"kwd\">for<\/span><span class=\"pln\"> x <\/span><span class=\"kwd\">in<\/span><span class=\"pln\"> it<\/span><span class=\"pun\">:<\/span>\n   <span class=\"kwd\">print<\/span> <span class=\"pun\">(<\/span><span class=\"pln\">x<\/span><span class=\"pun\">,<\/span> <span class=\"kwd\">end<\/span><span class=\"pun\">=<\/span><span class=\"str\">\" \"<\/span><span class=\"pun\">)<\/span>\n<span class=\"kwd\">or<\/span> <span class=\"kwd\">using<\/span> <span class=\"kwd\">next<\/span><span class=\"pun\">()<\/span> <span class=\"kwd\">function<\/span>\n<span class=\"kwd\">while<\/span> <span class=\"kwd\">True<\/span><span class=\"pun\">:<\/span>\n   <span class=\"kwd\">try<\/span><span class=\"pun\">:<\/span>\n      <span class=\"kwd\">print<\/span> <span class=\"pun\">(<\/span><span class=\"kwd\">next<\/span><span class=\"pun\">(<\/span><span class=\"pln\">it<\/span><span class=\"pun\">))<\/span>\n   <span class=\"kwd\">except<\/span> <span class=\"typ\">StopIteration<\/span><span class=\"pun\">:<\/span><span class=\"pln\">\n      sys<\/span><span class=\"pun\">.<\/span><span class=\"kwd\">exit<\/span><span class=\"pun\">()<\/span> <span class=\"com\">#you have to import sys module for this<\/span><\/pre>\n<p>A <b>generator<\/b> is a function that produces or yields a sequence of values using yield method.<\/p>\n<p>When a generator function is called, it returns a generator object without even beginning execution of the function. When the next() method is called for the first time, the function starts executing until it reaches the yield statement, which returns the yielded value. The yield keeps track i.e. remembers the last execution and the second next() call continues from previous value.<\/p>\n<h3>Example<\/h3>\n<p>The following example defines a generator, which generates an iterator for all the Fibonacci numbers.<\/p>\n<pre class=\"prettyprint notranslate prettyprinted\"><span class=\"pun\">!<\/span><span class=\"pln\">usr<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">bin<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">python3\n<\/span><span class=\"kwd\">import<\/span><span class=\"pln\"> sys\n<\/span><span class=\"kwd\">def<\/span><span class=\"pln\"> fibonacci<\/span><span class=\"pun\">(<\/span><span class=\"pln\">n<\/span><span class=\"pun\">):<\/span> <span class=\"com\">#generator function<\/span><span class=\"pln\">\n   a<\/span><span class=\"pun\">,<\/span><span class=\"pln\"> b<\/span><span class=\"pun\">,<\/span><span class=\"pln\"> counter <\/span><span class=\"pun\">=<\/span> <span class=\"lit\">0<\/span><span class=\"pun\">,<\/span> <span class=\"lit\">1<\/span><span class=\"pun\">,<\/span> <span class=\"lit\">0<\/span>\n   <span class=\"kwd\">while<\/span> <span class=\"kwd\">True<\/span><span class=\"pun\">:<\/span>\n      <span class=\"kwd\">if<\/span> <span class=\"pun\">(<\/span><span class=\"pln\">counter <\/span><span class=\"pun\">&gt;<\/span><span class=\"pln\"> n<\/span><span class=\"pun\">):<\/span> \n         <span class=\"kwd\">return<\/span>\n      <span class=\"kwd\">yield<\/span><span class=\"pln\"> a\n      a<\/span><span class=\"pun\">,<\/span><span class=\"pln\"> b <\/span><span class=\"pun\">=<\/span><span class=\"pln\"> b<\/span><span class=\"pun\">,<\/span><span class=\"pln\"> a <\/span><span class=\"pun\">+<\/span><span class=\"pln\"> b\n      counter <\/span><span class=\"pun\">+=<\/span> <span class=\"lit\">1<\/span><span class=\"pln\">\nf <\/span><span class=\"pun\">=<\/span><span class=\"pln\"> fibonacci<\/span><span class=\"pun\">(<\/span><span class=\"lit\">5<\/span><span class=\"pun\">)<\/span> <span class=\"com\">#f is iterator object<\/span>\n\n<span class=\"kwd\">while<\/span> <span class=\"kwd\">True<\/span><span class=\"pun\">:<\/span>\n   <span class=\"kwd\">try<\/span><span class=\"pun\">:<\/span>\n      <span class=\"kwd\">print<\/span> <span class=\"pun\">(<\/span><span class=\"kwd\">next<\/span><span class=\"pun\">(<\/span><span class=\"pln\">f<\/span><span class=\"pun\">),<\/span> <span class=\"kwd\">end<\/span><span class=\"pun\">=<\/span><span class=\"str\">\" \"<\/span><span class=\"pun\">)<\/span>\n   <span class=\"kwd\">except<\/span> <span class=\"typ\">StopIteration<\/span><span class=\"pun\">:<\/span><span class=\"pln\">\n      sys<\/span><span class=\"pun\">.<\/span><span class=\"kwd\">exit<\/span><span class=\"pun\">()<\/span><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Single Statement Suites If the suite of an if clause consists only of a single line, it may go on the same line as the header statement. Here is an example of a one-line if clause \u2212 Live Demo #!\/usr\/bin\/python var = 100 if ( var == 100 ) : print &#8220;Value of expression is &hellip;<\/p>\n","protected":false},"author":1,"featured_media":141,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rop_custom_images_group":[],"rop_custom_messages_group":[],"rop_publish_now":"initial","rop_publish_now_accounts":{"facebook_2613112545524186_272996453239123":"","twitter_aTo5NzY3MTIyNTIwMzEwNTM4MjQ7_976712252031053800":""},"rop_publish_now_history":[],"rop_publish_now_status":"pending","footnotes":""},"categories":[24],"tags":[],"class_list":["post-94","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Looping in Python - Learn Scripting<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learnscripting.org\/looping-in-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Looping in Python - Learn Scripting\" \/>\n<meta property=\"og:description\" content=\"Single Statement Suites If the suite of an if clause consists only of a single line, it may go on the same line as the header statement. Here is an example of a one-line if clause \u2212 Live Demo #!\/usr\/bin\/python var = 100 if ( var == 100 ) : print &quot;Value of expression is &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnscripting.org\/looping-in-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Learn Scripting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/profile.php?id=100064270142636\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-29T15:38:19+00:00\" \/>\n<meta name=\"author\" content=\"Shakti Das\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Shakti Das\" \/>\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:\\\/\\\/learnscripting.org\\\/looping-in-python\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/looping-in-python\\\/\"},\"author\":{\"name\":\"Shakti Das\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#\\\/schema\\\/person\\\/71045e0c38b97ea7f76363d6effa320c\"},\"headline\":\"Looping in Python\",\"datePublished\":\"2018-04-29T15:38:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/looping-in-python\\\/\"},\"wordCount\":456,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/looping-in-python\\\/#primaryimage\"},\"thumbnailUrl\":\"\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/learnscripting.org\\\/looping-in-python\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/looping-in-python\\\/\",\"url\":\"https:\\\/\\\/learnscripting.org\\\/looping-in-python\\\/\",\"name\":\"Looping in Python - Learn Scripting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/looping-in-python\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/looping-in-python\\\/#primaryimage\"},\"thumbnailUrl\":\"\",\"datePublished\":\"2018-04-29T15:38:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/looping-in-python\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/learnscripting.org\\\/looping-in-python\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/looping-in-python\\\/#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/looping-in-python\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/learnscripting.org\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Looping in Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#website\",\"url\":\"https:\\\/\\\/learnscripting.org\\\/\",\"name\":\"Learn Scripting\",\"description\":\"Coding Knowledge Unveiled: Empower Yourself\",\"publisher\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/learnscripting.org\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#organization\",\"name\":\"Learn Scripting\",\"url\":\"https:\\\/\\\/learnscripting.org\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/learnscripting.org\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/cropped-ls-600x600-1-512x512.jpg?fit=512%2C512&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/learnscripting.org\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/cropped-ls-600x600-1-512x512.jpg?fit=512%2C512&ssl=1\",\"width\":512,\"height\":512,\"caption\":\"Learn Scripting\"},\"image\":{\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/profile.php?id=100064270142636\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/learnscripting.org\\\/#\\\/schema\\\/person\\\/71045e0c38b97ea7f76363d6effa320c\",\"name\":\"Shakti Das\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5492ae25bd62294799695759ba85aaa28ae3d1de6b30be7cbdc377abc2ea0aac?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5492ae25bd62294799695759ba85aaa28ae3d1de6b30be7cbdc377abc2ea0aac?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5492ae25bd62294799695759ba85aaa28ae3d1de6b30be7cbdc377abc2ea0aac?s=96&d=mm&r=g\",\"caption\":\"Shakti Das\"},\"sameAs\":[\"https:\\\/\\\/learnscripting.org\"],\"url\":\"https:\\\/\\\/learnscripting.org\\\/author\\\/53kgl\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Looping in Python - Learn Scripting","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:\/\/learnscripting.org\/looping-in-python\/","og_locale":"en_US","og_type":"article","og_title":"Looping in Python - Learn Scripting","og_description":"Single Statement Suites If the suite of an if clause consists only of a single line, it may go on the same line as the header statement. Here is an example of a one-line if clause \u2212 Live Demo #!\/usr\/bin\/python var = 100 if ( var == 100 ) : print \"Value of expression is &hellip;","og_url":"https:\/\/learnscripting.org\/looping-in-python\/","og_site_name":"Learn Scripting","article_publisher":"https:\/\/www.facebook.com\/profile.php?id=100064270142636","article_published_time":"2018-04-29T15:38:19+00:00","author":"Shakti Das","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Shakti Das","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/learnscripting.org\/looping-in-python\/#article","isPartOf":{"@id":"https:\/\/learnscripting.org\/looping-in-python\/"},"author":{"name":"Shakti Das","@id":"https:\/\/learnscripting.org\/#\/schema\/person\/71045e0c38b97ea7f76363d6effa320c"},"headline":"Looping in Python","datePublished":"2018-04-29T15:38:19+00:00","mainEntityOfPage":{"@id":"https:\/\/learnscripting.org\/looping-in-python\/"},"wordCount":456,"commentCount":0,"publisher":{"@id":"https:\/\/learnscripting.org\/#organization"},"image":{"@id":"https:\/\/learnscripting.org\/looping-in-python\/#primaryimage"},"thumbnailUrl":"","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/learnscripting.org\/looping-in-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/learnscripting.org\/looping-in-python\/","url":"https:\/\/learnscripting.org\/looping-in-python\/","name":"Looping in Python - Learn Scripting","isPartOf":{"@id":"https:\/\/learnscripting.org\/#website"},"primaryImageOfPage":{"@id":"https:\/\/learnscripting.org\/looping-in-python\/#primaryimage"},"image":{"@id":"https:\/\/learnscripting.org\/looping-in-python\/#primaryimage"},"thumbnailUrl":"","datePublished":"2018-04-29T15:38:19+00:00","breadcrumb":{"@id":"https:\/\/learnscripting.org\/looping-in-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnscripting.org\/looping-in-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learnscripting.org\/looping-in-python\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/learnscripting.org\/looping-in-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/learnscripting.org\/"},{"@type":"ListItem","position":2,"name":"Looping in Python"}]},{"@type":"WebSite","@id":"https:\/\/learnscripting.org\/#website","url":"https:\/\/learnscripting.org\/","name":"Learn Scripting","description":"Coding Knowledge Unveiled: Empower Yourself","publisher":{"@id":"https:\/\/learnscripting.org\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnscripting.org\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/learnscripting.org\/#organization","name":"Learn Scripting","url":"https:\/\/learnscripting.org\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learnscripting.org\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/learnscripting.org\/wp-content\/uploads\/2022\/03\/cropped-ls-600x600-1-512x512.jpg?fit=512%2C512&ssl=1","contentUrl":"https:\/\/i0.wp.com\/learnscripting.org\/wp-content\/uploads\/2022\/03\/cropped-ls-600x600-1-512x512.jpg?fit=512%2C512&ssl=1","width":512,"height":512,"caption":"Learn Scripting"},"image":{"@id":"https:\/\/learnscripting.org\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/profile.php?id=100064270142636"]},{"@type":"Person","@id":"https:\/\/learnscripting.org\/#\/schema\/person\/71045e0c38b97ea7f76363d6effa320c","name":"Shakti Das","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5492ae25bd62294799695759ba85aaa28ae3d1de6b30be7cbdc377abc2ea0aac?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5492ae25bd62294799695759ba85aaa28ae3d1de6b30be7cbdc377abc2ea0aac?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5492ae25bd62294799695759ba85aaa28ae3d1de6b30be7cbdc377abc2ea0aac?s=96&d=mm&r=g","caption":"Shakti Das"},"sameAs":["https:\/\/learnscripting.org"],"url":"https:\/\/learnscripting.org\/author\/53kgl\/"}]}},"_links":{"self":[{"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/posts\/94","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/comments?post=94"}],"version-history":[{"count":0,"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/posts\/94\/revisions"}],"wp:attachment":[{"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/media?parent=94"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/categories?post=94"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learnscripting.org\/wp-json\/wp\/v2\/tags?post=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}