{"id":21077,"date":"2020-08-12T10:03:00","date_gmt":"2020-08-12T17:03:00","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=21077"},"modified":"2023-12-01T03:57:26","modified_gmt":"2023-12-01T11:57:26","slug":"python-unsupported-operand-types-for-str-and-int","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/","title":{"rendered":"Python TypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019 Solution"},"content":{"rendered":"\n<p>Integer values cannot be subtracted from string values and vice versa. This is because strings and integers are separate data types. If you try to subtract a string from an integer, you receive an error like \u201cTypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019\u201d.<br><\/p>\n\n\n\n<p>In this guide, we talk about the significance of this error and why it is raised. We walk through an example to help you figure out how to solve this error in your code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">TypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019<\/h2>\n\n\n\n<p>Unlike other programming languages, Python syntax is strongly typed. One consequence of this is you have to change the types of objects, like strings and integers, if you want to treat them as a different type of data.<br><\/p>\n\n\n\n<p>When you try to subtract a <a href=\"https:\/\/careerkarma.com\/blog\/python-string-methods\/\">string<\/a> for an <a href=\"https:\/\/careerkarma.com\/blog\/python-string-to-int\/\">integer<\/a> or vice versa, Python does not know what to do. This is because you cannot subtract string values.<br><\/p>\n\n\n\n<p>Similarly, you cannot add a string to an integer or divide a string by an integer. These operations all return an \u201cunsupported operand type(s)\u201d error.<\/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 spending application that tracks how much money someone will have left on their budget after making a purchase. This application asks a user to insert the value of each purchase they make. This will be subtracted from the total amount a user has in their budget.<br><\/p>\n\n\n\n<p>To start, ask a user to set a budget using the <a href=\"https:\/\/careerkarma.com\/blog\/python-input\/\">input() method<\/a>:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>budget = int(input(&quot;What is your budget for this month? &quot;))<\/pre><\/div>\n\n\n\n<p>We have converted this value to an integer using the <code>int()<\/code> method. Next, we ask a user to provide some details about their purchase. We ask about what they purchased and how much their purchase cost:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>purchase = input(&quot;What did you purchase? &quot;)\nprice = input(&quot;How much was this purchase? &quot;)<\/pre><\/div>\n\n\n\n<p>Next, we subtract the value of \u201cprice\u201d from \u201cbudget\u201d. This tells us how much a user has left in their budget.<br><\/p>\n\n\n\n<p>We do this using the subtraction operator (-):<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>money_left = budget - price\nprint(&quot;You have ${} left in your budget.&quot;.format(money_left))<\/pre><\/div>\n\n\n\n<p>Run our code to see if our program works:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>What is your budget for this month? 400\nWhat did you purchase? Monitor stand\nHow much was this purchase? 35\n\nTraceback (most recent call last):\n  File &quot;main.py&quot;, line 5, in &lt;module&gt;\n\tmoney_left = budget - price\nTypeError: unsupported operand type(s) for -: 'int' and 'str'<\/pre><\/div>\n\n\n\n<p>We\u2019ve told our program our budget is $400 for the month. We have just purchased a monitor stand that cost $35. Our program fails to calculate our new budget. Let\u2019s fix this error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Solution<\/h2>\n\n\n\n<p>To solve this error, we convert the value of \u201cprice\u201d to a string.<br><\/p>\n\n\n\n<p>By default, <code>input()<\/code> returns a string. We changed the value of \u201cbudget\u201d to be an integer earlier in our code. However, we did not change the value of \u201cprice\u201d. This results in our code subtracting an integer from a string which is not possible.<br><\/p>\n\n\n\n<p>Python cannot automatically convert a string to an integer because Python is statically typed.<br><\/p>\n\n\n\n<p>We solve this error by replacing the \u201cprice\u201d declaration with this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>price = int(input(&quot;How much was this purchase? &quot;))<\/pre><\/div>\n\n\n\n<p>We have surrounded the <code>input()<\/code> statement with <code>int()<\/code>. This makes the value stored in the \u201cprice\u201d <a href=\"https:\/\/careerkarma.com\/blog\/python-variables\/\">variable<\/a> an integer. This converts the value a user inserts into our program to an integer. Run our code with this revised line of code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>What is your budget for this month? 400\nWhat did you purchase? Monitor stand\nHow much was this purchase? 35\nYou have $365 left in your budget.<\/pre><\/div>\n\n\n\n<p>Our code runs successfully. Our code subtracts 35 from 400. Our program then prints out how much money we have left in our budget to the console.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Similar Errors<\/h2>\n\n\n\n<p>There are a number of \u201cunsupported operand type(s)\u201d errors in Python.<br><\/p>\n\n\n\n<p>These errors mean the same thing: you are trying to perform a <a href=\"https:\/\/careerkarma.com\/blog\/python-math-operators\/\">mathematical operation<\/a> on a string and a numerical value. Because strings do not support mathematical operations, you\u2019ll encounter an error.<br><\/p>\n\n\n\n<p>For instance, you see this error if you try to add a string and an integer:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>TypeError: unsupported operand type(s) for +: 'int' and 'str'<\/pre><\/div>\n\n\n\n<p>Similarly, you see this error if you try to find the remainder of a string and an integer:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>TypeError: unsupported operand type(s) for %: 'int' and 'str'<\/pre><\/div>\n\n\n\n<p>To solve this error in all cases, make sure you convert any string values to an integer before you use them in your code. You can do this using the <code>int()<\/code> method.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The \u201cTypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019\u201d error is raised when you try to subtract a string from an integer.<br><\/p>\n\n\n\n<p>You solve this error by converting all strings to integers using the <code>int()<\/code> method before performing a mathematical operation.<br><\/p>\n\n\n\n<p>Now you\u2019re ready to solve this common Python error like a professional developer!<\/p>\n","protected":false},"excerpt":{"rendered":"Integer values cannot be subtracted from string values and vice versa. This is because strings and integers are separate data types. If you try to subtract a string from an integer, you receive an error like \u201cTypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019\u201d. In this guide, we talk about the significance of this&hellip;","protected":false},"author":240,"featured_media":19116,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-21077","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: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019<\/title>\n<meta name=\"description\" content=\"On Career Karma, learn about the Python TypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019, how the error works, and how to solve the 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-unsupported-operand-types-for-str-and-int\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python TypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019 Solution\" \/>\n<meta property=\"og:description\" content=\"On Career Karma, learn about the Python TypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019, how the error works, and how to solve the error.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/\" \/>\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-08-12T17:03:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:57:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/luca-bravo-XJXWbfSo2f0-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\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-unsupported-operand-types-for-str-and-int\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python TypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019 Solution\",\"datePublished\":\"2020-08-12T17:03:00+00:00\",\"dateModified\":\"2023-12-01T11:57:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/\"},\"wordCount\":685,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/luca-bravo-XJXWbfSo2f0-unsplash.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/\",\"name\":\"TypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/luca-bravo-XJXWbfSo2f0-unsplash.jpg\",\"datePublished\":\"2020-08-12T17:03:00+00:00\",\"dateModified\":\"2023-12-01T11:57:26+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"On Career Karma, learn about the Python TypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019, how the error works, and how to solve the error.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/luca-bravo-XJXWbfSo2f0-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/luca-bravo-XJXWbfSo2f0-unsplash.jpg\",\"width\":1020,\"height\":680},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/#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: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019 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: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019","description":"On Career Karma, learn about the Python TypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019, how the error works, and how to solve the 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-unsupported-operand-types-for-str-and-int\/","og_locale":"en_US","og_type":"article","og_title":"Python TypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019 Solution","og_description":"On Career Karma, learn about the Python TypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019, how the error works, and how to solve the error.","og_url":"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-08-12T17:03:00+00:00","article_modified_time":"2023-12-01T11:57:26+00:00","og_image":[{"width":1020,"height":680,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/luca-bravo-XJXWbfSo2f0-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-unsupported-operand-types-for-str-and-int\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python TypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019 Solution","datePublished":"2020-08-12T17:03:00+00:00","dateModified":"2023-12-01T11:57:26+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/"},"wordCount":685,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/luca-bravo-XJXWbfSo2f0-unsplash.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/","url":"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/","name":"TypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/luca-bravo-XJXWbfSo2f0-unsplash.jpg","datePublished":"2020-08-12T17:03:00+00:00","dateModified":"2023-12-01T11:57:26+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"On Career Karma, learn about the Python TypeError: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019, how the error works, and how to solve the error.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/luca-bravo-XJXWbfSo2f0-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/luca-bravo-XJXWbfSo2f0-unsplash.jpg","width":1020,"height":680},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-unsupported-operand-types-for-str-and-int\/#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: unsupported operand type(s) for -: \u2018str\u2019 and \u2018int\u2019 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\/21077","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=21077"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/21077\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/19116"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=21077"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=21077"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=21077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}