{"id":22411,"date":"2020-09-10T21:56:52","date_gmt":"2020-09-11T04:56:52","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=22411"},"modified":"2023-12-01T03:59:35","modified_gmt":"2023-12-01T11:59:35","slug":"python-typeerror-str-object-cannot-be-interpreted-as-an-integer","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/","title":{"rendered":"Python TypeError: \u2018str\u2019 object cannot be interpreted as an integer Solution"},"content":{"rendered":"\n<p>The <a href=\"https:\/\/careerkarma.com\/blog\/python-range\/\">range() method<\/a> only accepts integer values as a parameter. If you try to use the <code>range()<\/code> method with a string value, you\u2019ll encounter the \u201cTypeError: \u2018str\u2019 object cannot be interpreted as an integer\u201d error.<br><\/p>\n\n\n\n<p>This guide discusses why you may encounter this error and what it means. We\u2019ll walk through an example scenario to help you understand this problem and fix it in your program.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">TypeError: \u2018str\u2019 object cannot be interpreted as an integer<\/h2>\n\n\n\n<p>The <code>range()<\/code> method creates a list of values in a particular range. It is commonly used with a for loop to run a certain number of iterations.<br><\/p>\n\n\n\n<p>The method <a href=\"https:\/\/careerkarma.com\/blog\/python-string-to-int\/\">only accepts integer values<\/a> as arguments. This is because the values that <code>range()<\/code> creates are integers. Consider the following program:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>create_range = range(5, 10)\nfor n in create_range:\n\t     print(n)<\/pre><\/div>\n\n\n\n<p>Our program prints out five integers to the console:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>5\n6\n7\n8\n9<\/pre><\/div>\n\n\n\n<p>If <code>range()<\/code> accepted strings, it would be more difficult for the function to determine what range of numbers should be created. That\u2019s why you always need to specify integers as arguments. In the above example, 5 and 10 were our arguments.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">An Example Scenario<\/h2>\n\n\n\n<p>We\u2019re going to build a program that lets a pizza restaurant view the names and prices of the most popular pizzas on their menu. To start, <a href=\"https:\/\/careerkarma.com\/blog\/how-to-initialize-a-list-in-python\/\">define two lists<\/a> that store the information with which our program will work:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>names = [&quot;Pepperoni&quot;, &quot;Margherita&quot;, &quot;Ham and Pineapple&quot;, &quot;Brie and Chive&quot;]\nprices = [9.00, 8.40, 8.40, 9.50]<\/pre><\/div>\n\n\n\n<p>These lists are parallel and appear in order of how popular a pizza is. That means the values at a particular position in the list correspond with each other. For instance, the price of a \u201cBrie and Chive\u201d pizza is $9.50.<br><\/p>\n\n\n\n<p>Our next task is to ask the user how many pizzas they would like to display. We can do this using an <a href=\"https:\/\/careerkarma.com\/blog\/python-input\/\">input() statement<\/a>:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>to_display = input(&quot;Enter the number of pizzas you would like to display: &quot;)<\/pre><\/div>\n\n\n\n<p>Now we know the number of pizzas about which the user is seeking information, we can use a <a href=\"https:\/\/careerkarma.com\/blog\/python-for-loop\/\">for loop<\/a> to print each pizza and its price to the console:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for p in range(0, to_display):\n\t     print(&quot;{} costs ${}.&quot;.format(names[p], prices[p]))<\/pre><\/div>\n\n\n\n<p>Our program prints out a message containing the name of each pizza and the price of that pizza. Our loop stops when it has iterated through the number of pizzas a user has requested to display to the console.<br><\/p>\n\n\n\n<p>Let\u2019s run our program and see if it works:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Enter the number of pizzas you would like to display: 2\nTraceback (most recent call last):\n  File &quot;main.py&quot;, line 6, in &lt;module&gt;\n\tfor p in range(0, to_display):\nTypeError: 'str' object cannot be interpreted as an integer<\/pre><\/div>\n\n\n\n<p>Our program returns an error on the line of code where we define our for loop.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Solution<\/h2>\n\n\n\n<p>We have created a for loop that runs a particular set of times depending on the value the user inserted into the console.<br><\/p>\n\n\n\n<p>The problem with our code is that <code>input()<\/code> returns a string, not an integer. This means our <code>range()<\/code> statement is trying to create a range of values using a string, which is not allowed. This is what our code evaluated in our program:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for p in range(0, &quot;2&quot;):\n\t     print(&quot;{} costs ${}.&quot;.format(names[p], prices[p]))<\/pre><\/div>\n\n\n\n<p>To fix this error, we must convert \u201cto_display\u201d to an integer. We can do this using the <code>int()<\/code> method:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for p in range(0, int(to_display)):\n\t     print(&quot;{} costs ${}.&quot;.format(names[p], prices[p]))<\/pre><\/div>\n\n\n\n<p>\u201cto_display\u201d is now an integer. This means we can use the value to create a range of numbers. Let\u2019s run our code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Enter the number of pizzas you would like to display: 2\nPepperoni costs $9.0.\nMargherita costs $8.4.<\/pre><\/div>\n\n\n\n<p>Our code successfully prints out the information that we requested. We can see the names of the two most popular pizzas and the prices of those pizzas.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The \u201cTypeError: \u2018str\u2019 object cannot be interpreted as an integer\u201d error is raised when you pass a string as an argument into a <code>range()<\/code> statement. To fix this error, make sure all the values you use in a <code>range()<\/code> statement are integers.<br><\/p>\n\n\n\n<p>Now you have the knowledge you need to fix this error like a professional!<\/p>\n","protected":false},"excerpt":{"rendered":"The range() method only accepts integer values as a parameter. If you try to use the range() method with a string value, you\u2019ll encounter the \u201cTypeError: \u2018str\u2019 object cannot be interpreted as an integer\u201d error. This guide discusses why you may encounter this error and what it means. We\u2019ll walk through an example scenario to&hellip;","protected":false},"author":240,"featured_media":22413,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-22411","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.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>TypeError: \u2018str\u2019 object cannot be interpreted as an integer | Career Karma<\/title>\n<meta name=\"description\" content=\"The Python TypeError: \u2018str\u2019 object cannot be interpreted as an integer error is raised when you use a string in a range() statement. On Career Karma, learn how to fix this error.\" \/>\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-typeerror-str-object-cannot-be-interpreted-as-an-integer\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python TypeError: \u2018str\u2019 object cannot be interpreted as an integer Solution\" \/>\n<meta property=\"og:description\" content=\"The Python TypeError: \u2018str\u2019 object cannot be interpreted as an integer error is raised when you use a string in a range() statement. On Career Karma, learn how to fix this error.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/\" \/>\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-09-11T04:56:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:59:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/altumcode-2l4ztyIYouk-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"749\" \/>\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-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python TypeError: \u2018str\u2019 object cannot be interpreted as an integer Solution\",\"datePublished\":\"2020-09-11T04:56:52+00:00\",\"dateModified\":\"2023-12-01T11:59:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/\"},\"wordCount\":575,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/altumcode-2l4ztyIYouk-unsplash.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/\",\"name\":\"TypeError: \u2018str\u2019 object cannot be interpreted as an integer | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/altumcode-2l4ztyIYouk-unsplash.jpg\",\"datePublished\":\"2020-09-11T04:56:52+00:00\",\"dateModified\":\"2023-12-01T11:59:35+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The Python TypeError: \u2018str\u2019 object cannot be interpreted as an integer error is raised when you use a string in a range() statement. On Career Karma, learn how to fix this error.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/altumcode-2l4ztyIYouk-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/altumcode-2l4ztyIYouk-unsplash.jpg\",\"width\":1020,\"height\":749},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#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 TypeError: \u2018str\u2019 object cannot be interpreted as an integer Solution\"}]},{\"@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\/#\/schema\/person\/image\/\",\"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":"TypeError: \u2018str\u2019 object cannot be interpreted as an integer | Career Karma","description":"The Python TypeError: \u2018str\u2019 object cannot be interpreted as an integer error is raised when you use a string in a range() statement. On Career Karma, learn how to fix this error.","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-typeerror-str-object-cannot-be-interpreted-as-an-integer\/","og_locale":"en_US","og_type":"article","og_title":"Python TypeError: \u2018str\u2019 object cannot be interpreted as an integer Solution","og_description":"The Python TypeError: \u2018str\u2019 object cannot be interpreted as an integer error is raised when you use a string in a range() statement. On Career Karma, learn how to fix this error.","og_url":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-09-11T04:56:52+00:00","article_modified_time":"2023-12-01T11:59:35+00:00","og_image":[{"width":1020,"height":749,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/altumcode-2l4ztyIYouk-unsplash.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-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python TypeError: \u2018str\u2019 object cannot be interpreted as an integer Solution","datePublished":"2020-09-11T04:56:52+00:00","dateModified":"2023-12-01T11:59:35+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/"},"wordCount":575,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/altumcode-2l4ztyIYouk-unsplash.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/","url":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/","name":"TypeError: \u2018str\u2019 object cannot be interpreted as an integer | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/altumcode-2l4ztyIYouk-unsplash.jpg","datePublished":"2020-09-11T04:56:52+00:00","dateModified":"2023-12-01T11:59:35+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The Python TypeError: \u2018str\u2019 object cannot be interpreted as an integer error is raised when you use a string in a range() statement. On Career Karma, learn how to fix this error.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/altumcode-2l4ztyIYouk-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/altumcode-2l4ztyIYouk-unsplash.jpg","width":1020,"height":749},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-cannot-be-interpreted-as-an-integer\/#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 TypeError: \u2018str\u2019 object cannot be interpreted as an integer Solution"}]},{"@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\/#\/schema\/person\/image\/","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\/22411","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=22411"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/22411\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/22413"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=22411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=22411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=22411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}