{"id":20598,"date":"2020-07-31T09:39:59","date_gmt":"2020-07-31T16:39:59","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=20598"},"modified":"2023-12-01T03:57:13","modified_gmt":"2023-12-01T11:57:13","slug":"python-syntaxerror-eol-while-scanning-string-literal","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/","title":{"rendered":"Python syntaxerror: EOL while scanning string literal Solution"},"content":{"rendered":"\n<p>Even the best developers make syntax errors all the time when they\u2019re coding. Programming languages have so many rules and even one typo can cause an error.<br><\/p>\n\n\n\n<p>If you\u2019ve encountered the error \u201csyntaxerror: EOL while scanning string literal\u201d, don\u2019t worry. In this guide, we\u2019re going to talk about what this error means and how to solve it. We\u2019ll walk through a few example scenarios to help you identify potential causes and solutions.<br><\/p>\n\n\n\n<p>Let\u2019s begin!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Problem: syntaxerror: EOL while scanning string literal<\/h2>\n\n\n\n<p>Syntax is like the grammar of a programming language. English has rules that govern punctuation and spelling; programming languages have similar rules.<br><\/p>\n\n\n\n<p>Let\u2019s take a look at our error:&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>syntaxerror: EOL while scanning string literal<\/pre><\/div>\n\n\n\n<p>The SyntaxError message tells us that we\u2019ve not followed the syntax rules of <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-python\/\">Python<\/a>.<br><\/p>\n\n\n\n<p>The description of the error indicates that Python is expecting a particular character to appear by the end of a line of code that was not found. For instance, Python may be expecting a <a href=\"https:\/\/careerkarma.com\/blog\/python-string-methods\/\">string<\/a> close (\u201d) character by the end of a line in which you have opened a string.<br><\/p>\n\n\n\n<p>If a syntax error is encountered, Python stops executing a program. This is because the Python interpreter needs you to rectify the issue before it can read the rest of your code.<br><\/p>\n\n\n\n<p>This error is commonly caused by:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Strings that span multiple lines using the wrong syntax<\/li><li>Missing quotation marks<\/li><li>Mismatching quotation marks<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Example Scenario: Multi-line Strings<\/h2>\n\n\n\n<p>In Python, strings can span multiple lines. The syntax for a multi-line string is different to that of a traditional string. Multi-line strings must be triple quoted, or written using three quotation marks.<br><\/p>\n\n\n\n<p>Let\u2019s take a look at a multi-line string:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>def welcome_hero():\n\tmessage = &quot;Welcome, Hero!\nYou have just entered the Castle of Doom. Your challenge, should you choose to accept it, is to locate the Sacred Emerald and take it back to the travelling salesman.&quot;\n\tprint(message)\n\nwelcome_hero()<\/pre><\/div>\n\n\n\n<p>We have defined a <a href=\"https:\/\/careerkarma.com\/blog\/python-functions\/\">function<\/a> called <code>welcome_hero()<\/code>. This function prints a message to the console. This message is assigned to the <a href=\"https:\/\/careerkarma.com\/blog\/python-variables\/\">variable<\/a> \u201cmessage\u201d. <\/p>\n\n\n\n<p>Let\u2019s try to run our code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>File &quot;main.py&quot;, line 2\n\tmessage = &quot;Welcome, Hero!\n                        \t^\nSyntaxError: EOL while scanning string literal<\/pre><\/div>\n\n\n\n<p>An error is returned. This is because a string using single or double quotes cannot span multiple lines. To solve this problem, we need to enclose our string with three single or double quotes. Any text that appears between these characters will be part of the string:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>message = &quot;&quot;&quot;Welcome, Hero!\nYou have just entered the Castle of Doom. Your challenge, should you choose to accept it, is to locate the Sacred Emerald and take it back to the travelling salesman.&quot;&quot;&quot;<\/pre><\/div>\n\n\n\n<p>Let\u2019s try to run our code with this revised line. Our code returns:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Welcome, Hero!\nYou have just entered the Castle of Doom. Your challenge, should you choose to accept it, is to locate the Sacred Emerald and take it back to the travelling salesman.<\/pre><\/div>\n\n\n\n<p>Success! Our code prints the message without an error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example Scenario: Missing Quotation Mark<\/h2>\n\n\n\n<p>Strings must be closed after the contents of a string have been declared. Otherwise, Python returns a syntax error. Let\u2019s take a look at a <a href=\"https:\/\/careerkarma.com\/blog\/python-substring\/\">string<\/a> that is not closed:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>def welcome_hero():\n\tmessage = &quot;Welcome, Hero!\n\tprint(message)\n\nwelcome_hero()<\/pre><\/div>\n\n\n\n<p>Let\u2019s run our code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>File &quot;main.py&quot;, line 2\n\tmessage = &quot;Welcome, Hero!\n                        \t^\nSyntaxError: EOL while scanning string literal<\/pre><\/div>\n\n\n\n<p>We have forgotten to close our string. If you look at the line of code where we declare the \u201cmessage\u201d variable, there is no closing string character.<br><\/p>\n\n\n\n<p>We can fix this error by closing our string using <strong>the same<\/strong> quotation mark that we used to open our string.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>def welcome_hero():\n\tmessage = &quot;Welcome, Hero!&quot;\n\tprint(message)\n\nwelcome_hero()<\/pre><\/div>\n\n\n\n<p>Let\u2019s run our code again:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Welcome, Hero!<\/pre><\/div>\n\n\n\n<p>Our code runs successfully.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example Scenario: Mismatching Quotation Marks<\/h2>\n\n\n\n<p>The type of quote you use to open a string should be the same as the type of quote you use to close a string.<br><\/p>\n\n\n\n<p>A syntax error is returned when the types of quotes that you use to open and close a string are different. Let\u2019s take a look at a program that opens a string using a single quote mark (\u2018) and closes a string using&nbsp; a double quote mark (\u201d):<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>def welcome_hero():\n\tmessage = 'Welcome, Hero!&quot;\n\tprint(message)\n\nwelcome_hero()<\/pre><\/div>\n\n\n\n<p>Our code returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>File &quot;main.py&quot;, line 2\n\tmessage = 'Welcome, Hero!&quot;\n                         \t^\nSyntaxError: EOL while scanning string literal<\/pre><\/div>\n\n\n\n<p>We can fix this problem by making our quotations match. We\u2019re going to change our first quotation mark to use double quotes (\u201c):<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>def welcome_hero():\n\tmessage = &quot;Welcome, Hero!&quot;\n\tprint(message)\n\nwelcome_hero()<\/pre><\/div>\n\n\n\n<p>Our code now runs successfully: Welcome, Hero!<\/p>\n\n\n\n<iframe loading=\"lazy\" frameborder=\"0\" width=\"100%\" height=\"400px\" src=\"https:\/\/repl.it\/@careerkarma\/EOL-while-scanning-string-literal?lite=true\"><\/iframe>\n<br>\n<br>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The \u201csyntaxerror: EOL while scanning string literal\u201d error is experienced by every Python developer. This error happens when:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>You forget to close a string<\/li><li>You close a string using the wrong symbol<\/li><li>You declare a multi-line string using one quotation mark instead of three<\/li><\/ul>\n\n\n\n<p>To solve this error, check if any of the above conditions are true. Then, make the requisite changes to your code. Now you\u2019re ready to start solving this error like a <a href=\"https:\/\/careerkarma.com\/blog\/how-long-to-learn-python\/\">Python expert<\/a>!<\/p>\n","protected":false},"excerpt":{"rendered":"Even the best developers make syntax errors all the time when they\u2019re coding. Programming languages have so many rules and even one typo can cause an error. If you\u2019ve encountered the error \u201csyntaxerror: EOL while scanning string literal\u201d, don\u2019t worry. In this guide, we\u2019re going to talk about what this error means and how to&hellip;","protected":false},"author":240,"featured_media":19656,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-20598","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>Python syntaxerror: EOL while scanning string literal | Career Karma<\/title>\n<meta name=\"description\" content=\"On Career Karma, learn about the Python syntaxerror: EOL while scanning string literal 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-syntaxerror-eol-while-scanning-string-literal\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python syntaxerror: EOL while scanning string literal Solution\" \/>\n<meta property=\"og:description\" content=\"On Career Karma, learn about the Python syntaxerror: EOL while scanning string literal error, how the error works, and how to solve the error.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/\" \/>\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-07-31T16:39:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:57:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/tirza-van-dijk-I8OhOu-wLO4-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"667\" \/>\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-syntaxerror-eol-while-scanning-string-literal\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python syntaxerror: EOL while scanning string literal Solution\",\"datePublished\":\"2020-07-31T16:39:59+00:00\",\"dateModified\":\"2023-12-01T11:57:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/\"},\"wordCount\":679,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/tirza-van-dijk-I8OhOu-wLO4-unsplash.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/\",\"name\":\"Python syntaxerror: EOL while scanning string literal | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/tirza-van-dijk-I8OhOu-wLO4-unsplash.jpg\",\"datePublished\":\"2020-07-31T16:39:59+00:00\",\"dateModified\":\"2023-12-01T11:57:13+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"On Career Karma, learn about the Python syntaxerror: EOL while scanning string literal error, how the error works, and how to solve the error.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/tirza-van-dijk-I8OhOu-wLO4-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/tirza-van-dijk-I8OhOu-wLO4-unsplash.jpg\",\"width\":1000,\"height\":667},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/#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 syntaxerror: EOL while scanning string literal 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":"Python syntaxerror: EOL while scanning string literal | Career Karma","description":"On Career Karma, learn about the Python syntaxerror: EOL while scanning string literal 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-syntaxerror-eol-while-scanning-string-literal\/","og_locale":"en_US","og_type":"article","og_title":"Python syntaxerror: EOL while scanning string literal Solution","og_description":"On Career Karma, learn about the Python syntaxerror: EOL while scanning string literal error, how the error works, and how to solve the error.","og_url":"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-07-31T16:39:59+00:00","article_modified_time":"2023-12-01T11:57:13+00:00","og_image":[{"width":1000,"height":667,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/tirza-van-dijk-I8OhOu-wLO4-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-syntaxerror-eol-while-scanning-string-literal\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python syntaxerror: EOL while scanning string literal Solution","datePublished":"2020-07-31T16:39:59+00:00","dateModified":"2023-12-01T11:57:13+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/"},"wordCount":679,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/tirza-van-dijk-I8OhOu-wLO4-unsplash.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/","url":"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/","name":"Python syntaxerror: EOL while scanning string literal | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/tirza-van-dijk-I8OhOu-wLO4-unsplash.jpg","datePublished":"2020-07-31T16:39:59+00:00","dateModified":"2023-12-01T11:57:13+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"On Career Karma, learn about the Python syntaxerror: EOL while scanning string literal error, how the error works, and how to solve the error.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/tirza-van-dijk-I8OhOu-wLO4-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/tirza-van-dijk-I8OhOu-wLO4-unsplash.jpg","width":1000,"height":667},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-syntaxerror-eol-while-scanning-string-literal\/#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 syntaxerror: EOL while scanning string literal 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\/20598","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=20598"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/20598\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/19656"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=20598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=20598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=20598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}