{"id":12159,"date":"2020-10-21T09:27:15","date_gmt":"2020-10-21T16:27:15","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=12159"},"modified":"2023-12-01T04:03:17","modified_gmt":"2023-12-01T12:03:17","slug":"python-break-and-continue","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/","title":{"rendered":"Python Break and Continue: Step-By-Step Guide"},"content":{"rendered":"\n<p><em>The Python break statement stops the loop in which the statement is placed. A Python continue statement skips a single iteration in a loop. Both break and continue statements can be used in a for or a while loop.<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>You may want to skip over a particular iteration of a loop or halt a loop entirely. That&#8217;s where the break and continue statements come in. These statements let you control the flow of a loop.<\/p>\n\n\n\n<p>Python\u2019s built-in <em>break<\/em> statement allows you to exit a loop when a condition is met. The <em>continue<\/em> statement allows you to skip part of a loop when a condition is met. In this guide, we\u2019re going to discuss how to use the Python break and continue statements.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Loop Refresher<\/h2>\n\n\n\n<p>Programmers use loops to automate and repeat similar tasks. One of the most commonly-used loops is a <a href=\"https:\/\/careerkarma.com\/blog\/python-for-loop\/\"><em>for<\/em> loop<\/a>. A <em>for<\/em> loop repeats a block of code as long as a certain condition is met. Here\u2019s the syntax for a <em>for<\/em> loop in Python:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for iterating_variable in range:\n\trun_code<\/pre><\/div>\n\n\n\n<p>The following <em>for<\/em> loop will iterate through a list of numbers from 0 through 2 and print them out:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for i in range(0,3):\n\tprint(i)<\/pre><\/div>\n\n\n\n<p> Our code returns the following: <\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>0\n1\n2<\/pre><\/div>\n\n\n\n<p>Our example code printed out the value <em>i<\/em> three times. This is a basic example of a loop. It demonstrates how a programmer can use loops to run repetitive tasks on a block of code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Break Statement<\/h2>\n\n\n\n<p>The Python break statement stops the loop in which the statement is placed. When a break statement is executed, the statements after the contents of the loop are executed.<\/p>\n\n\n\n<p>A break statement can be placed inside a nested loop. If a break statement appears in a nested loop, only the inner loop will stop executing. The outer loop will continue to execute until all iterations have occurred, or until the outer loop is broken using a break statement.<\/p>\n\n\n\n<p>You can use <em>break<\/em> statements to exit a loop when a specific condition is met. You declare a <em>break<\/em> statement within your loop, usually under an <em>if<\/em> statement.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Break Python Example<\/h3>\n\n\n\n<p>For example, you may have a list of student names to print out. You want your program to stop after the second name has printed. This will let you verify that the program works. Here\u2019s an example of a program that uses a <em>break<\/em> statement to do so:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>students = [&quot;Paul&quot;, &quot;Erin&quot;, &quot;Connie&quot;, &quot;Moira&quot;]\n\nfor student in range(0, len(students)):\n\tif student == 2:\n\t\tbreak\n    else:\n        print(students[student])\n\n\tprint(&quot;Counter is &quot; + str(student))\n\nprint(&quot;Program Complete&quot;)<\/pre><\/div>\n\n\n\n<p>First, we declared a <a href=\"https:\/\/careerkarma.com\/blog\/python-array\/\">Python list<\/a>. This list contains the names of students in the class. We then created a <em>for<\/em> loop. This loop prints out the name of each student to the Python shell.<\/p>\n\n\n\n<p>Inside our for loop, we added a break statement. This statement will execute if a student has the index value 2 in our list. When the break statement runs, the loop will stop.<\/p>\n\n\n\n<p>Our code returns the following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Paul\nCounter is 0\nErin\nCounter is 1\nProgram Complete<\/pre><\/div>\n\n\n\n<p>Our program printed out the names of the first two students (who have the index values <em>0<\/em> and <em>1<\/em> in our array). When the program reached the student with the index value <em>2<\/em>, the loop is terminated. The <a href=\"https:\/\/careerkarma.com\/blog\/python-print-without-new-line\/\">Python <\/a><a href=\"https:\/\/careerkarma.com\/blog\/python-print-without-new-line\/\"><em>print<\/em><\/a> statement at the end of our program ran.<\/p>\n\n\n\n<p>We used an else clause to tell our program what to do if our condition is not met. If our condition is not met, the name of the student over which we are iterating is printed to the Python console.<\/p>\n\n\n\n<p><em>break<\/em> statements cause a program to stop a loop. The program continues to execute the next statements in a main program after the loop has broken.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Continue Statement<\/h2>\n\n\n\n<p>The continue statement instructs a loop to continue to the next iteration. Any code that follows the continue statement is not executed. Unlike a break statement, a continue statement does not completely halt a loop.<\/p>\n\n\n\n<p>You can use a <em>continue<\/em> statement in Python to skip over part of a loop when a condition is met. Then, the rest of a loop will continue running. You use <em>continue<\/em> statements within loops, usually after an <em>if<\/em> statement.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Continue Python Example<\/h3>\n\n\n\n<p>Let\u2019s use an example to illustrate how the <em>continue<\/em> statement in Python works. In the following example, we use a <em>continue<\/em> statement to skip printing the second name in our array and then continue iterating:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>students = [&quot;Paul&quot;, &quot;Erin&quot;, &quot;Connie&quot;, &quot;Moira&quot;]\n\nfor student in range(0, len(students)):\n\tif student == 2:\n\t\tcontinue\n    else:\n\t\tprint(students[student])\n\n\tprint(&quot;Counter is &quot; + str(student))\n\nprint(&quot;Program Complete&quot;)<\/pre><\/div>\n\n\n\n<p> Our code returns the following: <\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Paul\nCounter is 0\nErin\nCounter is 1\nMoira\nCounter is 3\nProgram Complete<\/pre><\/div>\n\n\n\n<p>Our continue statement executes when an external condition is triggered. In our program, this condition is &#8220;student == 2&#8221;. When <em>student<\/em> is equal to <em>2, <\/em>our program stops executing that iteration of the loop.<\/p>\n\n\n\n<p>Our program continued iterating through subsequent list items after our continue statement was executed. If we had used a break statement, our loop would have stopped running entirely.<\/p>\n\n\n\n<p>The <em>continue<\/em> statement has a number of use cases. For instance, say you were validating data. You may want your loop to skip an iteration if a value is blank. This is because a blank value could interrupt the flow of your validation code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>When you\u2019re working with loops in Python, you may want to skip over an iteration or stop your loop entirely. This is where <em>continue<\/em> and <em>break<\/em> statements are useful, respectively.<\/p>\n\n\n\n<p>In this tutorial, we discussed how to use <em>break<\/em> and <em>continue<\/em> statements in Python to utilize loops in your code more effectively. Now you\u2019re ready to work with <em>break<\/em>, and<em> continue <\/em>statements like a Python expert!<\/p>\n\n\n\n<p>To learn more about coding in Python, read our complete guide on <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-python\/\">How to Learn Python<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"The Python break statement stops the loop in which the statement is placed. A Python continue statement skips a single iteration in a loop. Both break and continue statements can be used in a for or a while loop. You may want to skip over a particular iteration of a loop or halt a loop&hellip;","protected":false},"author":240,"featured_media":12160,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[12687],"class_list":{"0":"post-12159","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-python","8":"tag-tutorial"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Python","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Python Break and Continue: Step-By-Step Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"In Python, coders can use break and continue statements to exit out of a loop or to stop a loop entirely. Learn more in this article.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Break and Continue: Step-By-Step Guide\" \/>\n<meta property=\"og:description\" content=\"In Python, coders can use break and continue statements to exit out of a loop or to stop a loop entirely. Learn more in this article.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-21T16:27:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:03:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-BREAK.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"667\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-break-and-continue\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-break-and-continue\\\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python Break and Continue: Step-By-Step Guide\",\"datePublished\":\"2020-10-21T16:27:15+00:00\",\"dateModified\":\"2023-12-01T12:03:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-break-and-continue\\\/\"},\"wordCount\":889,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-break-and-continue\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/PYTHON-BREAK.jpg\",\"keywords\":[\"tutorial\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-break-and-continue\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-break-and-continue\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-break-and-continue\\\/\",\"name\":\"Python Break and Continue: Step-By-Step Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-break-and-continue\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-break-and-continue\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/PYTHON-BREAK.jpg\",\"datePublished\":\"2020-10-21T16:27:15+00:00\",\"dateModified\":\"2023-12-01T12:03:17+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"In Python, coders can use break and continue statements to exit out of a loop or to stop a loop entirely. Learn more in this article.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-break-and-continue\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-break-and-continue\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-break-and-continue\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/PYTHON-BREAK.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/PYTHON-BREAK.jpg\",\"width\":1000,\"height\":667},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-break-and-continue\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python Break and Continue: Step-By-Step Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/author\\\/jamesgallagher\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python Break and Continue: Step-By-Step Guide | Career Karma","description":"In Python, coders can use break and continue statements to exit out of a loop or to stop a loop entirely. Learn more in this article.","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:\/\/careerkarma.com\/blog\/python-break-and-continue\/","og_locale":"en_US","og_type":"article","og_title":"Python Break and Continue: Step-By-Step Guide","og_description":"In Python, coders can use break and continue statements to exit out of a loop or to stop a loop entirely. Learn more in this article.","og_url":"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-10-21T16:27:15+00:00","article_modified_time":"2023-12-01T12:03:17+00:00","og_image":[{"width":1000,"height":667,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-BREAK.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python Break and Continue: Step-By-Step Guide","datePublished":"2020-10-21T16:27:15+00:00","dateModified":"2023-12-01T12:03:17+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/"},"wordCount":889,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-BREAK.jpg","keywords":["tutorial"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-break-and-continue\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/","url":"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/","name":"Python Break and Continue: Step-By-Step Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-BREAK.jpg","datePublished":"2020-10-21T16:27:15+00:00","dateModified":"2023-12-01T12:03:17+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"In Python, coders can use break and continue statements to exit out of a loop or to stop a loop entirely. Learn more in this article.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-break-and-continue\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-BREAK.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-BREAK.jpg","width":1000,"height":667},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-break-and-continue\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/careerkarma.com\/blog\/python\/"},{"@type":"ListItem","position":3,"name":"Python Break and Continue: Step-By-Step Guide"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=12159"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12159\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/12160"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=12159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=12159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=12159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}