{"id":7441,"date":"2021-01-13T20:37:18","date_gmt":"2021-01-13T15:07:18","guid":{"rendered":"http:\/\/www.pythonpool.com\/?p=7441"},"modified":"2023-12-31T16:24:41","modified_gmt":"2023-12-31T10:54:41","slug":"sep-in-python","status":"publish","type":"post","link":"https:\/\/www.pythonpool.com\/sep-in-python\/","title":{"rendered":"Sep in Python | Examples, and Explanation"},"content":{"rendered":"\n<p>Hello coders!! In this article, we will cover <strong>sep in Python<\/strong>. It may happen at times that we want to<strong> print formatted multiple values <\/strong>in a Python program. The sep argument in Python comes into play in such scenarios. Without wasting any time, let&#8217;s dive straight into the topic.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_74 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #990303;color:#990303\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #990303;color:#990303\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.pythonpool.com\/sep-in-python\/#The_sep_parameter_in_Python\" >The sep parameter in Python:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.pythonpool.com\/sep-in-python\/#Syntax\" >Syntax:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.pythonpool.com\/sep-in-python\/#Example_1_Python_sep_%E2%80%9D\" >Example 1: Python sep =&#8221;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.pythonpool.com\/sep-in-python\/#Example_2_Python_sep_%E2%80%98n\" >Example 2: Python sep = &#8216;\\n&#8217;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.pythonpool.com\/sep-in-python\/#Example_3_Joining_a_list_with_a_separator_in_Python\" >Example 3: Joining a list with a separator in Python<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.pythonpool.com\/sep-in-python\/#Example_4_Parsing_a_string_in_Python_with_sep\" >Example 4: Parsing a string in Python with sep<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.pythonpool.com\/sep-in-python\/#Difference_between_sep_and_end\" >Difference between sep and end:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.pythonpool.com\/sep-in-python\/#Conclusion\" >Conclusion:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.pythonpool.com\/sep-in-python\/#Trending_Python_Articles\" >Trending Python Articles<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-the-sep-parameter-in-python\"><span class=\"ez-toc-section\" id=\"The_sep_parameter_in_Python\"><\/span>The sep parameter in Python:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Sep is a parameter in Python that primarily formats the printed statements on the output screen. <a href=\"https:\/\/en.wikipedia.org\/wiki\/Whitespace_(programming_language)\" target=\"_blank\" rel=\"noreferrer noopener\">Whitespace<\/a> is the default value of this parameter. It adds a separator between strings to be printed. Let us see some examples to make our concept clear.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-syntax\"><span class=\"ez-toc-section\" id=\"Syntax\"><\/span>Syntax:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>print(argument1, argument2, ..., sep = value)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-example-1-python-sep\"><span class=\"ez-toc-section\" id=\"Example_1_Python_sep_%E2%80%9D\"><\/span>Example 1: Python sep =&#8221;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nprint(&quot;Python&quot;, &quot;Pool&quot;, sep = '')\n<\/pre><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"554\" height=\"44\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/image-47.png\" alt=\"Output Python sep =\" class=\"wp-image-7462\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/image-47.png 554w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/image-47-300x24.png 300w\" sizes=\"(max-width: 554px) 100vw, 554px\" \/><figcaption class=\"wp-element-caption\">Output<\/figcaption><\/figure><\/div>\n\n\n<p>As we can see, when the value of sep is empty, there is no gap between the two statements. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-example-2-python-sep-n\"><span class=\"ez-toc-section\" id=\"Example_2_Python_sep_%E2%80%98n\"><\/span>Example 2: Python sep = &#8216;\\n&#8217;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ncolor=&#x5B;'red','blue','orange','pink']\nprint(*color, sep = &quot;, &quot;)  \nprint()\nprint(*color, sep = &quot;\\n&quot;) \n<\/pre><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"475\" height=\"223\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/image-46.png\" alt=\"python sep =\\n\" class=\"wp-image-7458\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/image-46.png 475w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/image-46-300x141.png 300w\" sizes=\"(max-width: 475px) 100vw, 475px\" \/><figcaption class=\"wp-element-caption\">Output<\/figcaption><\/figure><\/div>\n\n\n<p>In this example, when we use the sep value  <strong>&#8216;, &#8216; <\/strong>the list&#8217;s values are printed in a comma-separated fashion. When the value of sep is <strong>&#8216;\\n,&#8217;<\/strong> i.e., newline, the list&#8217;s value is <a href=\"http:\/\/www.pythonpool.com\/python-print-without-newline\/\" target=\"_blank\" rel=\"noreferrer noopener\">printed in a new line<\/a> every time.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-example-3-joining-a-list-with-a-separator-in-python\"><span class=\"ez-toc-section\" id=\"Example_3_Joining_a_list_with_a_separator_in_Python\"><\/span>Example 3: Joining a list with a separator in Python<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ncolors=&#x5B;'red','blue','orange','pink']\ns=&quot;_&quot;.join(colors)\nprint(s)\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-preformatted\">red_blue_orange_pink<\/pre>\n\n\n\n<p>In this particular example, we first declared a list of colors containing four values: red, blue, orange, and pink. We then declared the sep value as &#8216; _&#8217;. When we join the list using that separator, we can see that in the output, the value of the list is printed with the separator.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-example-4-parsing-a-string-in-python-with-sep\"><span class=\"ez-toc-section\" id=\"Example_4_Parsing_a_string_in_Python_with_sep\"><\/span>Example 4: Parsing a string in Python with sep<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ntxt = &quot;Python, a programming language, is easy to understand&quot;\nprint(txt.split(&quot;, &quot;))\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-preformatted\">['Python', 'a programming language', 'is easy to understand']<\/pre>\n\n\n\n<p>As we can see here, the value of the separator is a comma. As a result, the string is split at places where a comma is present in the sentence.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-difference-between-sep-and-end\"><span class=\"ez-toc-section\" id=\"Difference_between_sep_and_end\"><\/span>Difference between sep and end:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>end<\/strong><\/td><td class=\"has-text-align-left\" data-align=\"left\"><strong>sep<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">prints once all the values in the given print statement are printed<\/td><td class=\"has-text-align-left\" data-align=\"left\">separates the print value by inserting the given value between them<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Example: <\/strong><br>st1=&#8217;python&#8217;<br>st2=&#8217;pool&#8217;<br>print(st1,st2,end=&#8217;%&#8217;)<br><br><strong>Output:<\/strong><br>python pool%<br><\/td><td class=\"has-text-align-left\" data-align=\"left\"><strong>Example:<\/strong><br>st1=&#8217;python&#8217;<br>st2=&#8217;pool&#8217;<br>print(st1,st2,sep=&#8217;%&#8217;)<br><br><strong>Output:<\/strong><br>python%pool<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>With this, we come to the end of this article. The concept of sep for print statement formatting is relatively easy and simple. It finds major use in coding all over.<\/p>\n\n\n\n<p>However, if you have any doubts or questions, do let me know in the comment section below. I will try to help you as soon as possible.<\/p>\n\n\n\n<p><strong><em>Happy Pythoning!<\/em><\/strong><\/p>\n\n\n<div class=\"monsterinsights-widget-popular-posts monsterinsights-widget-popular-posts-delta monsterinsights-popular-posts-styled monsterinsights-widget-popular-posts-columns-2\"><h2 class=\"monsterinsights-widget-popular-posts-widget-title\"><span class=\"ez-toc-section\" id=\"Trending_Python_Articles\"><\/span>Trending Python Articles<span class=\"ez-toc-section-end\"><\/span><\/h2><ul class=\"monsterinsights-widget-popular-posts-list\"><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-cant-compare-datetime-datetime-to-datetime-date\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/typeerror-cant-compare-datetime.datetime-to-datetime.date_.webp 1200w \" alt=\"[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] typeerror can&#8217;t compare datetime.datetime to datetime.date<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 11, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-nameerror-name-unicode-is-not-defined\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-nameerror-name-Unicode-is-not-defined.webp 1200w \" alt=\"[Fixed] nameerror: name Unicode is not defined\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] nameerror: name Unicode is not defined<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/solved-runtimeerror-cuda-error-invalid-device-ordinal\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Solved-runtimeerror-cuda-error-invalid-device-ordinal.webp 1200w \" alt=\"[Solved] runtimeerror: cuda error: invalid device ordinal\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Solved] runtimeerror: cuda error: invalid device ordinal<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><li ><a href=\"https:\/\/www.pythonpool.com\/fixed-typeerror-type-numpy-ndarray-doesnt-define-__round__-method\/\"><div class=\"monsterinsights-widget-popular-posts-image\"><img decoding=\"async\" src=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-300x157.webp\" srcset=\" https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-300x157.webp 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-1024x536.webp 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method-768x402.webp 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2024\/01\/Fixed-typeerror-type-numpy.ndarray-doesnt-define-__round__-method.webp 1200w \" alt=\"[Fixed] typeerror: type numpy.ndarray doesn&#8217;t define __round__ method\" \/><\/div><div class=\"monsterinsights-widget-popular-posts-text\"><span class=\"monsterinsights-widget-popular-posts-title\" >[Fixed] typeerror: type numpy.ndarray doesn&#8217;t define __round__ method<\/span><div class=\"monsterinsights-widget-popular-posts-meta\" ><span class=\"monsterinsights-widget-popular-posts-author\">by Namrata Gulati<\/span><span>&#9679;<\/span><span class=\"monsterinsights-widget-popular-posts-date\">January 2, 2024<\/span><\/div><\/div><\/a><\/li><\/ul><\/div><p><\/p>","protected":false},"excerpt":{"rendered":"<p>Hello coders!! In this article, we will cover sep in Python. It may happen at times that we want to print formatted multiple values in &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Sep in Python | Examples, and Explanation\" class=\"read-more button\" href=\"https:\/\/www.pythonpool.com\/sep-in-python\/#more-7441\" aria-label=\"More on Sep in Python | Examples, and Explanation\">Read more<\/a><\/p>\n","protected":false},"author":12,"featured_media":7691,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[15],"tags":[3232,3234,3235,3236,3231,3240,3239,3237,3242,3233,3241],"class_list":["post-7441","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-print-sep-python","tag-python-os-sep","tag-python-print-sep","tag-python-sep-2","tag-python-sep","tag-python-sep-3","tag-sep-python-3","tag-sep-in-python","tag-sep-in-python-2","tag-sep-python","tag-what-is-sep-in-python","infinite-scroll-item"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.1 (Yoast SEO v25.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Sep in Python | Examples, and Explanation - Python Pool<\/title>\n<meta name=\"description\" content=\"Sep in python primarily formats the printed statements in the output screen. It adds a separator between strings to be printed.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pythonpool.com\/sep-in-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Sep in Python | Examples, and Explanation\" \/>\n<meta property=\"og:description\" content=\"Hello coders!! In this article, we will cover sep in Python. It may happen at times that we want to print formatted multiple values in a Python program.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pythonpool.com\/sep-in-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Pool\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-13T15:07:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-31T10:54:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/Theatre-Actor-Portfolio-Website-18.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1350\" \/>\n\t<meta property=\"og:image:height\" content=\"650\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Prachee Sao\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:site\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prachee Sao\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pythonpool.com\/sep-in-python\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/sep-in-python\/\"},\"author\":{\"name\":\"Prachee Sao\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/b91d749826b21e606d55cda77d51ef47\"},\"headline\":\"Sep in Python | Examples, and Explanation\",\"datePublished\":\"2021-01-13T15:07:18+00:00\",\"dateModified\":\"2023-12-31T10:54:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/sep-in-python\/\"},\"wordCount\":392,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/sep-in-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/Theatre-Actor-Portfolio-Website-18.png\",\"keywords\":[\"print sep python\",\"python os sep\",\"python print sep\",\"python sep\",\"python sep=\",\"python sep=&#039;&#039;\",\"sep = python\",\"sep in python\",\"sep= in python\",\"sep= python\",\"what is sep in python\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.pythonpool.com\/sep-in-python\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pythonpool.com\/sep-in-python\/\",\"url\":\"https:\/\/www.pythonpool.com\/sep-in-python\/\",\"name\":\"Sep in Python | Examples, and Explanation - Python Pool\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/sep-in-python\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/sep-in-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/Theatre-Actor-Portfolio-Website-18.png\",\"datePublished\":\"2021-01-13T15:07:18+00:00\",\"dateModified\":\"2023-12-31T10:54:41+00:00\",\"description\":\"Sep in python primarily formats the printed statements in the output screen. It adds a separator between strings to be printed.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pythonpool.com\/sep-in-python\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pythonpool.com\/sep-in-python\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/sep-in-python\/#primaryimage\",\"url\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/Theatre-Actor-Portfolio-Website-18.png\",\"contentUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/Theatre-Actor-Portfolio-Website-18.png\",\"width\":1350,\"height\":650,\"caption\":\"Sep in Python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pythonpool.com\/sep-in-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pythonpool.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sep in Python | Examples, and Explanation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pythonpool.com\/#website\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"name\":\"Python Pool\",\"description\":\"Your One-Stop Python Learning Destination\",\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pythonpool.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pythonpool.com\/#organization\",\"name\":\"Python Pool\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"contentUrl\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"width\":452,\"height\":185,\"caption\":\"Python Pool\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/pythonpool\",\"https:\/\/www.youtube.com\/c\/pythonpool\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/b91d749826b21e606d55cda77d51ef47\",\"name\":\"Prachee Sao\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d018c3758049ab2511d0772ac1f73c338aaa8c921577f39e0f1e5716fc7efcb4?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d018c3758049ab2511d0772ac1f73c338aaa8c921577f39e0f1e5716fc7efcb4?s=96&d=wavatar&r=g\",\"caption\":\"Prachee Sao\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Sep in Python | Examples, and Explanation - Python Pool","description":"Sep in python primarily formats the printed statements in the output screen. It adds a separator between strings to be printed.","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:\/\/www.pythonpool.com\/sep-in-python\/","og_locale":"en_US","og_type":"article","og_title":"Sep in Python | Examples, and Explanation","og_description":"Hello coders!! In this article, we will cover sep in Python. It may happen at times that we want to print formatted multiple values in a Python program.","og_url":"https:\/\/www.pythonpool.com\/sep-in-python\/","og_site_name":"Python Pool","article_published_time":"2021-01-13T15:07:18+00:00","article_modified_time":"2023-12-31T10:54:41+00:00","og_image":[{"width":1350,"height":650,"url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/Theatre-Actor-Portfolio-Website-18.png","type":"image\/png"}],"author":"Prachee Sao","twitter_card":"summary_large_image","twitter_creator":"@pythonpool","twitter_site":"@pythonpool","twitter_misc":{"Written by":"Prachee Sao","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pythonpool.com\/sep-in-python\/#article","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/sep-in-python\/"},"author":{"name":"Prachee Sao","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/b91d749826b21e606d55cda77d51ef47"},"headline":"Sep in Python | Examples, and Explanation","datePublished":"2021-01-13T15:07:18+00:00","dateModified":"2023-12-31T10:54:41+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pythonpool.com\/sep-in-python\/"},"wordCount":392,"commentCount":3,"publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"image":{"@id":"https:\/\/www.pythonpool.com\/sep-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/Theatre-Actor-Portfolio-Website-18.png","keywords":["print sep python","python os sep","python print sep","python sep","python sep=","python sep=&#039;&#039;","sep = python","sep in python","sep= in python","sep= python","what is sep in python"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pythonpool.com\/sep-in-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pythonpool.com\/sep-in-python\/","url":"https:\/\/www.pythonpool.com\/sep-in-python\/","name":"Sep in Python | Examples, and Explanation - Python Pool","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pythonpool.com\/sep-in-python\/#primaryimage"},"image":{"@id":"https:\/\/www.pythonpool.com\/sep-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/Theatre-Actor-Portfolio-Website-18.png","datePublished":"2021-01-13T15:07:18+00:00","dateModified":"2023-12-31T10:54:41+00:00","description":"Sep in python primarily formats the printed statements in the output screen. It adds a separator between strings to be printed.","breadcrumb":{"@id":"https:\/\/www.pythonpool.com\/sep-in-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pythonpool.com\/sep-in-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/sep-in-python\/#primaryimage","url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/Theatre-Actor-Portfolio-Website-18.png","contentUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/01\/Theatre-Actor-Portfolio-Website-18.png","width":1350,"height":650,"caption":"Sep in Python"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pythonpool.com\/sep-in-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pythonpool.com\/"},{"@type":"ListItem","position":2,"name":"Sep in Python | Examples, and Explanation"}]},{"@type":"WebSite","@id":"https:\/\/www.pythonpool.com\/#website","url":"https:\/\/www.pythonpool.com\/","name":"Python Pool","description":"Your One-Stop Python Learning Destination","publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pythonpool.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pythonpool.com\/#organization","name":"Python Pool","url":"https:\/\/www.pythonpool.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","contentUrl":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","width":452,"height":185,"caption":"Python Pool"},"image":{"@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/pythonpool","https:\/\/www.youtube.com\/c\/pythonpool"]},{"@type":"Person","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/b91d749826b21e606d55cda77d51ef47","name":"Prachee Sao","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d018c3758049ab2511d0772ac1f73c338aaa8c921577f39e0f1e5716fc7efcb4?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d018c3758049ab2511d0772ac1f73c338aaa8c921577f39e0f1e5716fc7efcb4?s=96&d=wavatar&r=g","caption":"Prachee Sao"}}]}},"_links":{"self":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/7441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/comments?post=7441"}],"version-history":[{"count":15,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/7441\/revisions"}],"predecessor-version":[{"id":31373,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/7441\/revisions\/31373"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media\/7691"}],"wp:attachment":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media?parent=7441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/categories?post=7441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/tags?post=7441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}