{"id":22294,"date":"2020-09-07T10:19:51","date_gmt":"2020-09-07T17:19:51","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=22294"},"modified":"2023-12-01T03:59:24","modified_gmt":"2023-12-01T11:59:24","slug":"python-typeerror-unsupported-operand-types-for-nonetype-and-str","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/","title":{"rendered":"Python TypeError: unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019 Solution"},"content":{"rendered":"\n<p><a href=\"https:\/\/careerkarma.com\/blog\/python-concatenate-strings\/\">Strings can be concatenated in Python<\/a>. This lets you merge the value of two or more strings into one string. If you try to concatenate a string and a value equal to None, you\u2019ll encounter the \u201cTypeError: unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019\u201d error.<br><\/p>\n\n\n\n<p>This guide talks about what this error means and why it is raised. It discusses an example of this error so you can figure out how to fix it in your code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">TypeError: unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019<\/h2>\n\n\n\n<p>The concatenation operator (+) merges <a href=\"https:\/\/careerkarma.com\/blog\/python-string-methods\/\">string values<\/a>:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>day = &quot;Monday&quot;\nweather = &quot;sunny&quot;\nprint(&quot;It's &quot; + day + &quot; and it is &quot; weather + &quot; outside.&quot;)<\/pre><\/div>\n\n\n\n<p>This code merges the \u201cIt\u2019s\u201d, \u201cMonday\u201d, &#8220;and it is \u201d, \u201csunny\u201d, and \u201coutside.\u201d strings into one long string. The code returns: \u201cIt\u2019s Monday and it is sunny outside.\u201d.<br><\/p>\n\n\n\n<p>The concatenation operator cannot be used to merge values of different data types, such as a string and an integer. This is because the plus sign has different associations with data types like an integer. With integers and floats, the plus sign represents the addition operation.<br><\/p>\n\n\n\n<p>Values equal to None cannot be concatenated with a string value. This causes the error \u201cTypeError: unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019\u201d.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">An Example Scenario<\/h2>\n\n\n\n<p>Let\u2019s build a program that prints out a message displaying information about how much a shoe shop has earned in the last month. This information includes the net and gross income of the store, the value of the highest sale, and the value of the average sale, at the shoe store.&nbsp;<br><\/p>\n\n\n\n<p>To start, <a href=\"https:\/\/careerkarma.com\/blog\/python-add-to-dictionary\/\">declare a dictionary<\/a> that stores some values about what the shoe shop has earned in a month:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>turnover = {\n\t   &quot;month&quot;: &quot;July&quot;,\n\t   &quot;net_income&quot;: 7203.97,\n\t   &quot;gross_income&quot;: 23821.30,\n\t   &quot;highest_sale&quot;: 320.00,\n\t   &quot;average_sale&quot;: 45.00\n}<\/pre><\/div>\n\n\n\n<p>The owner of the shoe store wants to see these values when they run the program. You\u2019re going to use a print statement to access the values about turnover at the store. Use five print statements to display the information in the dictionary:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(&quot;Month: &quot;) + turnover[&quot;month&quot;]  \nprint(&quot;Net income: $&quot;) + str(turnover[&quot;net_income&quot;])\nprint(&quot;Gross income: $&quot;) + str(turnover[&quot;gross_income&quot;])\nprint(&quot;Highest sale: $&quot;) + str(turnover[&quot;highest_sale&quot;])\nprint(&quot;Average sale: $&quot;) + str(turnover[&quot;average_sale&quot;])<\/pre><\/div>\n\n\n\n<p>We convert all of the <a href=\"https:\/\/careerkarma.com\/blog\/python-string-to-int\/\">floating-point values in the dictionary to a string<\/a>. This prevents an error that occurs when you try to concatenate a string and a float. As discussed earlier, only strings can be concatenated to strings. Next, run the code and see what happens:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Month\nTraceback (most recent call last):\n  File &quot;main.py&quot;, line 9, in &lt;module&gt;\n\t     print(&quot;Month&quot;) + turnover[&quot;month&quot;]  \nTypeError: unsupported operand type(s) for +: 'NoneType' and 'str'<\/pre><\/div>\n\n\n\n<p>The code returns an error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Solution<\/h2>\n\n\n\n<p>The code successfully prints out the word \u201cMonth\u201d to the console. The program stops working when you try to add the value of turnover[\u201cmonth\u201d] to the \u201cMonth\u201d string.<br><\/p>\n\n\n\n<p>The issue is that you\u2019re concatenating the turnover[\u201cmonth\u201d] string outside of the <code>print()<\/code> statement. The <code>print()<\/code> function returns None. Because your concatenation operator comes after the <code>print()<\/code> statement, Python thinks that you are trying to add a value to it:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(&quot;Month&quot;) + turnover[&quot;month&quot;]  <\/pre><\/div>\n\n\n\n<p>To solve this error, we must move the concatenation operation into the <code>print()<\/code> statements:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(&quot;Month: &quot; + turnover[&quot;month&quot;])\nprint(&quot;Net income: $&quot; + str(turnover[&quot;net_income&quot;]))\nprint(&quot;Gross income: $&quot; + str(turnover[&quot;gross_income&quot;]))\nprint(&quot;Highest sale: $&quot; + str(turnover[&quot;highest_sale&quot;]))\nprint(&quot;Average sale: $&quot; + str(turnover[&quot;average_sale&quot;]))<\/pre><\/div>\n\n\n\n<p>Concatenation operators should always come after a string value, not the <code>print()<\/code> statement whose value you want to concatenate. Let\u2019s execute the program:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Month: July\nNet income: $7203.97\nGross income: $23821.3\nHighest sale: $320.0\nAverage sale: $45.0<\/pre><\/div>\n\n\n\n<p>Our code successfully executes all of the <code>print()<\/code> statements. Each print statement contains a label to which a value from the \u201cturnover\u201d dictionary is concatenated.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The \u201cTypeError: unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019\u201d error is raised when you try to concatenate a value equal to None with a string. This is common if you try to concatenate strings outside of a <code>print()<\/code> statement.<br><\/p>\n\n\n\n<p>To solve this error, check the values on both sides of a plus sign are strings if you want to perform a concatenation operation.<br><\/p>\n\n\n\n<p>Now you\u2019re ready to fix this error in your <a href=\"https:\/\/careerkarma.com\/blog\/what-python-is-used-for\/\">Python program<\/a> like a professional coder!<\/p>\n","protected":false},"excerpt":{"rendered":"Strings can be concatenated in Python. This lets you merge the value of two or more strings into one string. If you try to concatenate a string and a value equal to None, you\u2019ll encounter the \u201cTypeError: unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019\u201d error. This guide talks about what this error means and&hellip;","protected":false},"author":240,"featured_media":14378,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-22294","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>Unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019 | Career Karma<\/title>\n<meta name=\"description\" content=\"On Career Karma, learn about the Python TypeError: unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019 error, 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-typeerror-unsupported-operand-types-for-nonetype-and-str\/\" \/>\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 +: \u2018nonetype\u2019 and \u2018str\u2019 Solution\" \/>\n<meta property=\"og:description\" content=\"On Career Karma, learn about the Python TypeError: unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019 error, how the error works, and how to solve the error.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/\" \/>\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-07T17:19:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:59:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/you-x-ventures-Oalh2MojUuk-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-typeerror-unsupported-operand-types-for-nonetype-and-str\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python TypeError: unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019 Solution\",\"datePublished\":\"2020-09-07T17:19:51+00:00\",\"dateModified\":\"2023-12-01T11:59:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/\"},\"wordCount\":585,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/you-x-ventures-Oalh2MojUuk-unsplash.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/\",\"name\":\"Unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019 | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/you-x-ventures-Oalh2MojUuk-unsplash.jpg\",\"datePublished\":\"2020-09-07T17:19:51+00:00\",\"dateModified\":\"2023-12-01T11:59:24+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 +: \u2018nonetype\u2019 and \u2018str\u2019 error, how the error works, and how to solve the error.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/you-x-ventures-Oalh2MojUuk-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/you-x-ventures-Oalh2MojUuk-unsplash.jpg\",\"width\":1020,\"height\":680},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/#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 +: \u2018nonetype\u2019 and \u2018str\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":"Unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019 | Career Karma","description":"On Career Karma, learn about the Python TypeError: unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019 error, 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-typeerror-unsupported-operand-types-for-nonetype-and-str\/","og_locale":"en_US","og_type":"article","og_title":"Python TypeError: unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019 Solution","og_description":"On Career Karma, learn about the Python TypeError: unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019 error, how the error works, and how to solve the error.","og_url":"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-09-07T17:19:51+00:00","article_modified_time":"2023-12-01T11:59:24+00:00","og_image":[{"width":1020,"height":680,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/you-x-ventures-Oalh2MojUuk-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-unsupported-operand-types-for-nonetype-and-str\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python TypeError: unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019 Solution","datePublished":"2020-09-07T17:19:51+00:00","dateModified":"2023-12-01T11:59:24+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/"},"wordCount":585,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/you-x-ventures-Oalh2MojUuk-unsplash.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/","url":"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/","name":"Unsupported operand type(s) for +: \u2018nonetype\u2019 and \u2018str\u2019 | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/you-x-ventures-Oalh2MojUuk-unsplash.jpg","datePublished":"2020-09-07T17:19:51+00:00","dateModified":"2023-12-01T11:59:24+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 +: \u2018nonetype\u2019 and \u2018str\u2019 error, how the error works, and how to solve the error.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/you-x-ventures-Oalh2MojUuk-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/you-x-ventures-Oalh2MojUuk-unsplash.jpg","width":1020,"height":680},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-unsupported-operand-types-for-nonetype-and-str\/#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 +: \u2018nonetype\u2019 and \u2018str\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\/22294","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=22294"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/22294\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/14378"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=22294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=22294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=22294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}