{"id":12044,"date":"2020-10-14T22:27:42","date_gmt":"2020-10-15T05:27:42","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=12044"},"modified":"2023-12-01T04:01:34","modified_gmt":"2023-12-01T12:01:34","slug":"python-substring","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-substring\/","title":{"rendered":"Python Substring: A Step-By-Step Guide"},"content":{"rendered":"\n<p><em>A Python substring is a portion of text taken from a string. You can extract a substring in Python using slicing, with the format: YourString[StartingIndex:StoppingIndex:CharactersToSkip].<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>Often, programmers have data that they want to split up into different parts. For example, a developer may have the full name of a user, and only need to get their first name. In this case, the developer would want to split up the name into two parts: forename and surname.<\/p>\n\n\n\n<p>How do you accomplish this in the Python programming language? That\u2019s where string <em>slicing<\/em> comes into play. Using a technique called <em>slicing<\/em>, we can get a specific part of a string, which then becomes a <em>substring<\/em>. In this tutorial, we are going to break down how substrings work in Python, and how you can use slicing to create your own.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">String Indexes: A Refresher<\/h2>\n\n\n\n<p>Before we go on to discuss slicing and the slice syntax, we must first look at how <a href=\"https:\/\/careerkarma.com\/blog\/python-string-methods\/\">Python strings<\/a> are indexed.<\/p>\n\n\n\n<p>In Python, a string is a sequence of one or more characters that could include numbers, spaces, letters, or symbols. You can access parts of a string in the same way that you would with other sequences, like a list.<\/p>\n\n\n\n<p>Each character in a string has its own <a href=\"https:\/\/careerkarma.com\/blog\/python-index\/\">index value<\/a>, which states the location of the character in the string. These numbers start with the index number 0. For example, here is how the string <em>Python Substrings<\/em> would be represented:<\/p>\n\n\n\n<table class=\"wp-block-table course-info-table\"><tbody><tr><td>P<\/td><td>y<\/td><td>t<\/td><td>h<\/td><td>o<\/td><td>n<\/td><td><br><\/td><td>S<\/td><td>u<\/td><td>b<\/td><td>s<\/td><td>t<\/td><td>r<\/td><td>i<\/td><td>n<\/td><td>g<\/td><td>!<\/td><\/tr><tr><td>0<\/td><td>1<\/td><td>2<\/td><td>3<\/td><td>4<\/td><td>5<\/td><td>6<\/td><td>7<\/td><td>8<\/td><td>9<\/td><td>10<\/td><td>11<\/td><td>12<\/td><td>13<\/td><td>14<\/td><td>15<\/td><td>16<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>The first character in our string (<em>P<\/em>), has the index value of 0. The <em>! character<\/em> has an index value of 16.<\/p>\n\n\n\n<p>Because each character has its own index number, we are able to read and change individual characters in our strings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python String Substring<\/h2>\n\n\n\n<p>Let\u2019s say that we want to get the first three characters from a string\u2014how do we do it? Or what if we want to retrieve the last two characters in a string?<\/p>\n\n\n\n<p>We can use a technique called slicing to retrieve particular pieces of data from a string. This is where we specify sequence of characters from a certain string that we want to retrieve. We can use slices to get any data we want from a string. The syntax we use is:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>string[start:end:step]<\/pre><\/div>\n\n\n\n<p>There are three components to a slice:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>start: The index position at which our slice should begin. This is 0 by default.<\/li><li>end: The position at which the slice ends. The character at the end position is not included in the slice. By default, end is the length of the string.<\/li><li>step: Instructs the slice to ignore every Nth character. N is equal to the step you specify. step is equal to 1 by default.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Substring Python: Examples<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Retrieve the First Three Characters<\/h3>\n\n\n\n<p>We&#8217;re going to retrieve the <a href=\"https:\/\/careerkarma.com\/blog\/python-remove-first-n-characters-from-string\/\">first three characters from a string<\/a>. To do so, we&#8217;ll use slicing syntax:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>ourString = &quot;Python Substring!&quot;\nprint(ourString[0:3])<\/pre><\/div>\n\n\n\n<p>The output for our code is:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Pyt<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Leave Out the Start Number<\/h3>\n\n\n\n<p>We can also leave out the first number to get all characters up to a certain value in the text. This is convenient if the text we need to get is at the start of a string.<\/p>\n\n\n\n<p>We can use this technique to retrieve the first three characters from a string without having to specify 0 as our start number:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>ourString = &quot;Python Substring!&quot;\nprint(ourString[:3])<\/pre><\/div>\n\n\n\n<p>Our code returns the same output as our earlier example. We have not specified a start value. This is because start is 0 by default. We want to retrieve characters from the start of our string so this syntax works.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Retrieve the Last Two Characters<\/h3>\n\n\n\n<p>We can retrieve the last five characters of a string by using a negative index value and a start number:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>value = &quot;Python&quot;\nprint(value[-2:])<\/pre><\/div>\n\n\n\n<p>Our code returns: on. We have only specified one value: -2. This is our start number. -2 tells our slice to start retrieving characters from the second to last index position in our string.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Other Examples<\/h2>\n\n\n\n<p>We&#8217;ve prepared a few other examples to help you learn how to use the slicing method.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Retrieve the Last Character in a String<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>value = &quot;Python&quot;\nprint(value[-1])\n\nOutput: n<\/pre><\/div>\n\n\n\n<p>We have only specified a start value in this example. There is no end value. This means our string will only retrieve the last character.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Retrieve Characters in the Range of 2 and 3<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>value = &quot;Python&quot;\nprint(value[2:3])\n\nOutput: t<\/pre><\/div>\n\n\n\n<p>Our start value is 2 and our end value is 3. All the characters in the range of 2 and 3 are returned. This excludes character 3 itself, because the end value is exclusive.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Skip Every Second Character<\/h3>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>value = &quot;Python&quot;\nprint(value[::2])\n\nOutput: Pto<\/pre><\/div>\n\n\n\n<p>We have used two colons to tell Python that we want to use the default start and end parameters. We have specified 2 as our step. This means that our slice will retrieve every second chracter from our string.<\/p>\n\n\n\n<p><strong>View the Repl.it from this tutorial:<\/strong><\/p>\n\n\n\n<iframe loading=\"lazy\" src=\"https:\/\/repl.it\/@careerkarma\/Python-Substring?lite=true\" width=\"100%\" height=\"400px\" frameborder=\"0\"><\/iframe>\n<br>\n<br>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>A substring is part of a larger string. To retrieve a substring, you can use the slicing syntax. Slicing lets you define a range of characters to retrieve. You can use an optional third parameter to skip over particular characters in a range.<\/p>\n\n\n\n<p>Learn more about the Python language in our <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-python\/\">learn Python guide<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"A Python substring is a portion of text taken from a string. You can extract a substring in Python using slicing, with the format: YourString[StartingIndex:StoppingIndex:CharactersToSkip]. Often, programmers have data that they want to split up into different parts. For example, a developer may have the full name of a user, and only need to get&hellip;","protected":false},"author":240,"featured_media":11344,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-12044","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-python"},"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 Substring: A Step-By-Step Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"Python substrings are a string function that helps us get data from larger strings. Learn how to use them 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-substring\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Substring: A Step-By-Step Guide\" \/>\n<meta property=\"og:description\" content=\"Python substrings are a string function that helps us get data from larger strings. Learn how to use them in this article.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-substring\/\" \/>\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-15T05:27:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:01:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/blur-business-close-up-code-270557.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"666\" \/>\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=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-substring\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-substring\\\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python Substring: A Step-By-Step Guide\",\"datePublished\":\"2020-10-15T05:27:42+00:00\",\"dateModified\":\"2023-12-01T12:01:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-substring\\\/\"},\"wordCount\":851,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-substring\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/blur-business-close-up-code-270557.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-substring\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-substring\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-substring\\\/\",\"name\":\"Python Substring: A Step-By-Step Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-substring\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-substring\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/blur-business-close-up-code-270557.jpg\",\"datePublished\":\"2020-10-15T05:27:42+00:00\",\"dateModified\":\"2023-12-01T12:01:34+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"Python substrings are a string function that helps us get data from larger strings. Learn how to use them in this article.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-substring\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-substring\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-substring\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/blur-business-close-up-code-270557.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/blur-business-close-up-code-270557.jpg\",\"width\":1000,\"height\":666},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-substring\\\/#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 Substring: A 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 Substring: A Step-By-Step Guide | Career Karma","description":"Python substrings are a string function that helps us get data from larger strings. Learn how to use them 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-substring\/","og_locale":"en_US","og_type":"article","og_title":"Python Substring: A Step-By-Step Guide","og_description":"Python substrings are a string function that helps us get data from larger strings. Learn how to use them in this article.","og_url":"https:\/\/careerkarma.com\/blog\/python-substring\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-10-15T05:27:42+00:00","article_modified_time":"2023-12-01T12:01:34+00:00","og_image":[{"width":1000,"height":666,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/blur-business-close-up-code-270557.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":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-substring\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-substring\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python Substring: A Step-By-Step Guide","datePublished":"2020-10-15T05:27:42+00:00","dateModified":"2023-12-01T12:01:34+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-substring\/"},"wordCount":851,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-substring\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/blur-business-close-up-code-270557.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-substring\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-substring\/","url":"https:\/\/careerkarma.com\/blog\/python-substring\/","name":"Python Substring: A Step-By-Step Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-substring\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-substring\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/blur-business-close-up-code-270557.jpg","datePublished":"2020-10-15T05:27:42+00:00","dateModified":"2023-12-01T12:01:34+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"Python substrings are a string function that helps us get data from larger strings. Learn how to use them in this article.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-substring\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-substring\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-substring\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/blur-business-close-up-code-270557.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/blur-business-close-up-code-270557.jpg","width":1000,"height":666},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-substring\/#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 Substring: A 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\/12044","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=12044"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12044\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/11344"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=12044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=12044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=12044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}