{"id":20853,"date":"2020-08-05T23:32:23","date_gmt":"2020-08-06T06:32:23","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=20853"},"modified":"2023-12-01T03:57:20","modified_gmt":"2023-12-01T11:57:20","slug":"python-typeerror-not-all-arguments-converted-during-string-formatting","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/","title":{"rendered":"Python typeerror: not all arguments converted during string formatting"},"content":{"rendered":"\n<p><a href=\"https:\/\/careerkarma.com\/blog\/what-python-is-used-for\/\">Python<\/a> is a stickler for the rules. One of the main features of the Python language keeps you in check so that your programs work in the way that you intend. You may encounter an error saying \u201cnot all arguments converted during string formatting\u201d when you\u2019re working with strings.<br><\/p>\n\n\n\n<p>In this guide, we talk about this error and why it pops up. We walk through two common scenarios where this error is raised to help you solve it in your code.<br><\/p>\n\n\n\n<p>Without further ado, let\u2019s begin!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Problem: typeerror: not all arguments converted during string formatting<\/h2>\n\n\n\n<p>A TypeError is a type of error that tells us we are performing a task that cannot be executed on a value of a certain type. In this case, our type error relates to a string value.<br><\/p>\n\n\n\n<p>Python offers a number of ways that you can format <a href=\"https:\/\/careerkarma.com\/blog\/python-string-methods\/\">strings<\/a>. This allows you to insert values into strings or concatenate values to the end of a string.<br><\/p>\n\n\n\n<p>Two of the most common ways of <a href=\"https:\/\/careerkarma.com\/blog\/python-f-string\/\">formatting strings<\/a> are:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Using the % operator (old-style)<\/li><li>Using the {} operator with the .format() function<\/li><\/ul>\n\n\n\n<p>When you try to use both of these syntaxes together, an error is raised.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example: Mixing String Formatting Rules<\/h2>\n\n\n\n<p>Let\u2019s write a program that calculates a 5% price increase on a product sold at a bakery.<br><\/p>\n\n\n\n<p>We start by collecting two pieces of information from the user: the name of the product and the price of the product. We do this using an <a href=\"https:\/\/careerkarma.com\/blog\/python-input\/\">input() statement<\/a>:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>name = input(&quot;Enter the name of the product: &quot;)\nprice = input(&quot;Enter the price of the product: &quot;)<\/pre><\/div>\n\n\n\n<p>Next, we calculate the new price of the product by multiplying the value of \u201cprice\u201d by 1.05. This represents a 5% price increase:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>increase = round(float(price) * 1.05, 2)<\/pre><\/div>\n\n\n\n<p>We round the value of \u201cincrease\u201d to two decimal places using a <a href=\"https:\/\/careerkarma.com\/blog\/python-round\/\">round() statement<\/a>. Finally, use string formatting to print out the new price of the product to the console:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(&quot;The new price of {} is ${}. &quot; % name, str(increase))<\/pre><\/div>\n\n\n\n<p>This code adds the values of \u201cname\u201d and \u201cincrease\u201d into our string. We convert \u201cincrease\u201d to a string to merge it into our string. Before we convert the value, \u201cincrease\u201d is a floating-point number. Run our code and see what happens:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Traceback (most recent call last):\n  File &quot;main.py&quot;, line 6, in &lt;module&gt;\n\tprint(&quot;The new price of {} is {}&quot; % name, str(discount))\nTypeError: not all arguments converted during string formatting<\/pre><\/div>\n\n\n\n<p>It appears there is an error on the last line of our code.<br><\/p>\n\n\n\n<p>The problem is we mixed up our string formatting syntax. We used the {} and % operators. These are used for two different types of string formatting.<br><\/p>\n\n\n\n<p>To solve this problem, we replace the last line of our programming with either of the two following lines of code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(&quot;The new price of {} is ${}.&quot;.format(name, str(increase)))\n\nprint(&quot;The new price of %s is $%s.&quot; % (name, str(increase)))<\/pre><\/div>\n\n\n\n<p>The first line of code uses the <code>.format()<\/code> syntax. This replaces the values of {} with the values in the <code>.format()<\/code> statement in the order they are specified.<br><\/p>\n\n\n\n<p>The second line of code uses the old-style % string formatting technique. The values \u201c%s\u201d is replaced with those that are enclosed in parenthesis after the % operator.<br><\/p>\n\n\n\n<p>Let\u2019s run our code again and see what happens:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Enter the name of the product: Babka\nEnter the price of the product: 2.50\nThe new price of Babka is $2.62.<\/pre><\/div>\n\n\n\n<p>Our code successfully added our arguments into our string.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example: Confusing the Modulo Operator<\/h2>\n\n\n\n<p>Python uses the percentage sign (%) to calculate <a href=\"https:\/\/careerkarma.com\/blog\/python-modulo\/\">modulo numbers<\/a> and string formatting. Modulo numbers are the remainder left over after a division sum.<br><\/p>\n\n\n\n<p>If you use the percentage sign on a string, it is used for formatting; if you use the percentage sign on a number, it is used to calculate the modulo. Hence, if a value is formatted as a string on which you want to perform a modulo calculation, an error is raised.<br><\/p>\n\n\n\n<p>Take a look at a program that calculates whether a number is odd or even:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>number = input(&quot;Please enter a number: &quot;)\nmod_calc = number % 2\n\nif mod_calc == 0:\n\tprint(&quot;This number is even.&quot;)\nelse:\n\tprint(&quot;This number is odd.&quot;)<\/pre><\/div>\n\n\n\n<p>First, we ask the user to enter a number. We then use the modulo operator to calculate the remainder that is returned when \u201cnumber\u201d is divided by 2.<br><\/p>\n\n\n\n<p>If the returning value by the modulo operator is equal to 0, the contents of our <code>if<\/code> statement execute. Otherwise, the contents of the <code>else<\/code> statement runs.<br><\/p>\n\n\n\n<p>Let\u2019s run our code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Please enter a number: 7\nTraceback (most recent call last):\n  File &quot;main.py&quot;, line 2, in &lt;module&gt;\n\tmod_calc = number % 2\nTypeError: not all arguments converted during string formatting<\/pre><\/div>\n\n\n\n<p>Another TypeError. This error is raised because \u201cnumber\u201d is a string. The <code>input()<\/code> method returns a string. We need to convert \u201cnumber\u201d to a floating-point or an integer if we want to perform a modulo calculation.<br><\/p>\n\n\n\n<p>We can convert \u201cnumber\u201d to a float by using the float() function:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>mod_calc = float(number) % 2<\/pre><\/div>\n\n\n\n<p>Let\u2019s try to run our code again:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Please enter a number: 7\nThis number is odd.<\/pre><\/div>\n\n\n\n<p>Our code works!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The \u201cnot all arguments converted during string formatting\u201d error is raised when Python does not add in all arguments to a string format operation. This happens if you mix up your string formatting syntax or if you try to perform a modulo operation on a string.<br><\/p>\n\n\n\n<p>Now you\u2019re ready to solve this common Python error like a <a href=\"https:\/\/careerkarma.com\/careers\/software-engineer\/\">professional software engineer<\/a>!<\/p>\n","protected":false},"excerpt":{"rendered":"Python is a stickler for the rules. One of the main features of the Python language keeps you in check so that your programs work in the way that you intend. You may encounter an error saying \u201cnot all arguments converted during string formatting\u201d when you\u2019re working with strings. In this guide, we talk about&hellip;","protected":false},"author":240,"featured_media":3957,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-20853","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>Not all arguments converted during string formatting | Career Karma<\/title>\n<meta name=\"description\" content=\"On Career Karma, learn about the Python typeerror: not all arguments converted during string formatting 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-not-all-arguments-converted-during-string-formatting\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python typeerror: not all arguments converted during string formatting\" \/>\n<meta property=\"og:description\" content=\"On Career Karma, learn about the Python typeerror: not all arguments converted during string formatting error, how the error works, and how to solve the error.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/\" \/>\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-06T06:32:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:57:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/nesa-by-makers-7d4LREDSPyQ-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python typeerror: not all arguments converted during string formatting\",\"datePublished\":\"2020-08-06T06:32:23+00:00\",\"dateModified\":\"2023-12-01T11:57:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/\"},\"wordCount\":750,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/nesa-by-makers-7d4LREDSPyQ-unsplash.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/\",\"name\":\"Not all arguments converted during string formatting | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/nesa-by-makers-7d4LREDSPyQ-unsplash.jpg\",\"datePublished\":\"2020-08-06T06:32:23+00:00\",\"dateModified\":\"2023-12-01T11:57:20+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"On Career Karma, learn about the Python typeerror: not all arguments converted during string formatting error, how the error works, and how to solve the error.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/nesa-by-makers-7d4LREDSPyQ-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/nesa-by-makers-7d4LREDSPyQ-unsplash.jpg\",\"width\":1200,\"height\":800},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#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: not all arguments converted during string formatting\"}]},{\"@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":"Not all arguments converted during string formatting | Career Karma","description":"On Career Karma, learn about the Python typeerror: not all arguments converted during string formatting 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-not-all-arguments-converted-during-string-formatting\/","og_locale":"en_US","og_type":"article","og_title":"Python typeerror: not all arguments converted during string formatting","og_description":"On Career Karma, learn about the Python typeerror: not all arguments converted during string formatting error, how the error works, and how to solve the error.","og_url":"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-08-06T06:32:23+00:00","article_modified_time":"2023-12-01T11:57:20+00:00","og_image":[{"width":1200,"height":800,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/nesa-by-makers-7d4LREDSPyQ-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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python typeerror: not all arguments converted during string formatting","datePublished":"2020-08-06T06:32:23+00:00","dateModified":"2023-12-01T11:57:20+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/"},"wordCount":750,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/nesa-by-makers-7d4LREDSPyQ-unsplash.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/","url":"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/","name":"Not all arguments converted during string formatting | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/nesa-by-makers-7d4LREDSPyQ-unsplash.jpg","datePublished":"2020-08-06T06:32:23+00:00","dateModified":"2023-12-01T11:57:20+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"On Career Karma, learn about the Python typeerror: not all arguments converted during string formatting error, how the error works, and how to solve the error.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/nesa-by-makers-7d4LREDSPyQ-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/nesa-by-makers-7d4LREDSPyQ-unsplash.jpg","width":1200,"height":800},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-not-all-arguments-converted-during-string-formatting\/#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: not all arguments converted during string formatting"}]},{"@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\/20853","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=20853"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/20853\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/3957"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=20853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=20853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=20853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}