{"id":3605,"date":"2020-07-16T14:47:46","date_gmt":"2020-07-16T09:17:46","guid":{"rendered":"http:\/\/www.pythonpool.com\/?p=3605"},"modified":"2024-01-01T13:19:17","modified_gmt":"2024-01-01T07:49:17","slug":"python-double-slash","status":"publish","type":"post","link":"https:\/\/www.pythonpool.com\/python-double-slash\/","title":{"rendered":"Working With Python Double Slash Operator"},"content":{"rendered":"\n<p>Python provides two different kinds of division \u2013 <strong>one is a floating-point division, and the other one is an integer division or floor division<\/strong>. If we want our answer to have decimal values, we use \u2018\/,\u2019 and if we wish our answer to be the floor value (integer), we should use a double slash in Python.<\/p>\n\n\n\n<p>Floor value is the closest value (must be<strong> less<\/strong>) or equal to the given number. For example- if we get to use a single slash (floating division) like this \u2013 5\/2, we get 2.5, but if we use a double slash like this- 5\/\/2, we get the answer as 2. \u20182\u2019 is just lesser than \u20182.5\u2019 as we discussed above. Let us know more about double slash in Python.<\/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\/python-double-slash\/#Python_2_vs_Python_3\" >Python 2 vs. Python 3<\/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\/python-double-slash\/#Comparing_the_double_slash_of_Python_with_other_programming_languages\" >Comparing the double slash of Python with other programming languages<\/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\/python-double-slash\/#Python_Double_Forward_slash\" >Python Double Forward slash<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.pythonpool.com\/python-double-slash\/#To_include_%E2%80%98_in_our_string_like_a_path_%E2%80%93\" >To include \u2018\\\u2019 in our string like a path \u2013<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.pythonpool.com\/python-double-slash\/#To_print_n_and_t_which_are_newline_and_tab_we_have_to_use_the_double_backslash_in_Python\" >To print \\n and \\t which are newline and tab, we have to use the double backslash in Python<\/a><\/li><\/ul><\/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\/python-double-slash\/#Must_Read\" >Must Read<\/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\/python-double-slash\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-python-2-vs-python-3\"><span class=\"ez-toc-section\" id=\"Python_2_vs_Python_3\"><\/span>Python 2 vs. Python 3<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In Python 2.7, we did not have the concepts of two different kinds of division operators. We just used to single slash to get the floor value.<\/p>\n\n\n\n<p><strong>Python 2.7 program-<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nprint 5\/2\nprint -5\/2\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"158\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/image-14-1024x158.png\" alt=\"python double slash\" class=\"wp-image-3606\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/image-14-1024x158.png 1024w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/image-14-300x46.png 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/image-14-768x118.png 768w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/image-14-1536x237.png 1536w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/image-14-20x3.png 20w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/image-14.png 1584w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">Output-<br>2<br>-3<\/pre>\n\n\n\n<p>It is different from what we are used to in python3. But in python2.7, when we divided<strong> \u20135\/2, <\/strong>we got <strong>\u20133<\/strong>. Usually, we would have gotten \u20132.5, but as \u20133 is just smaller than \u20132.5, we have this answer.<br>But it is not like we cannot print output as float values. To print values as the float in python2.7, we can do the following.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nprint 5.0\/2.0\nprint -5.0\/2.0\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-preformatted\">Output-<br>2.5<br>-2.5<\/pre>\n\n\n\n<p><br>But in python3, if we want our answer in float, we can use a single slash <strong>(\u2018\/\u2019)<\/strong>. And to get the answer in integer, we have to use a double slash <strong>(\u201c\/\/\u201d)<\/strong> in Python.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n# Integer Division Positive Value\na=5\nb=2\nprint(a\/\/b)\n# Integer Division Negative Value\na=-5\nb=2\nprint(a\/\/b)\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-preformatted\">Output-<br>2<br>-3<\/pre>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n#Float Division Positive Value\na=5\nb=2\nprint(a\/b)\n# Float Division Negative Value\na=-5\nb=2\nprint(a\/b)\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-preformatted\">Output-<br>2.5<br>-2.5<\/pre>\n\n\n\n<p>We have seen how we used forward double slash<strong> (\u2018\/\/\u2019)<\/strong> in Python to perform integer division. Now, let us see how we can use double slash<strong> \u2018\\\u2019<\/strong> to avoid backslash problems in the string.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-comparing-the-double-slash-of-python-with-other-programming-languages\"><span class=\"ez-toc-section\" id=\"Comparing_the_double_slash_of_Python_with_other_programming_languages\"><\/span>Comparing the double slash of Python with other programming languages<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Each programming language tackles integer\/integer division differently. If we try to perform 5\/2 in C++ or in Java, we will get the following result-<\/p>\n\n\n\n<p><strong>C++<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\n#include &lt;iostream&gt;\nusing namespace std;\nint main()\n{\ncout&lt;&lt;5\/2;\nreturn 0;\n}\n<\/pre><\/div>\n\n\n<p>Output-<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">2<\/pre>\n\n\n\n<p><strong>Java-<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; title: ; notranslate\" title=\"\">\npublic class Division{ \n  public static void main(String &#x5B;]args){\n    System.out.println(5\/2);\n }\n}\n<\/pre><\/div>\n\n\n<p>Output-<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">2<\/pre>\n\n\n\n<p>As you must have observed, unlike Python, we are getting 2.5 as the output here. And if we want our result in floating points, we need to do a <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Divide\" target=\"_blank\" rel=\"noreferrer noopener\">divide<\/a> like this- 5.0\/2.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-python-double-forward-slash\"><span class=\"ez-toc-section\" id=\"Python_Double_Forward_slash\"><\/span>Python Double Forward slash<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-to-include-in-our-string-like-a-path\"><span class=\"ez-toc-section\" id=\"To_include_%E2%80%98_in_our_string_like_a_path_%E2%80%93\"><\/span>To include <strong>\u2018\\\u2019<\/strong> in our string like a path \u2013 <span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>\u201cC:\\Users\\Owner\\Documents\\ashwini\u201d <\/strong>in python. If we just print like this-<br>print(\u201cC:\\Users\\Owner\\Documents\\ashwini\u201d)<\/p>\n\n\n\n<p>The output will be &#8211;<\/p>\n\n\n\n<p><strong>SyntaxError: (unicode error) &#8216;unicodeescape&#8217; codec can&#8217;t decode bytes in position 2-3: truncated \\UXXXXXXXX escape<\/strong><\/p>\n\n\n\n<p>So, we have to use a double backslash (\u2018\\\u2019) instead of (\u2018\\\u2019).<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ns=&quot;C:\\Users\\Owner\\Documents\\ashwini&quot;\nprint(s)\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-preformatted\">Output-<br>C:\\Users\\Owner\\Documents\\ashwini<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-to-print-n-and-t-which-are-newline-and-tab-we-have-to-use-the-double-backslash-in-python\"><span class=\"ez-toc-section\" id=\"To_print_n_and_t_which_are_newline_and_tab_we_have_to_use_the_double_backslash_in_Python\"><\/span>To print \\n and \\t which are newline and tab, we have to use the double backslash in Python<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nprint(&quot;\\n and \\t&quot;)\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-preformatted\">Output-\n\\n and \\t<\/pre>\n\n\n\n<p>When we need to open a file, we use a double backslash in the path. For example, if we have a file at location &#8211; <strong>C:\\Users\\Owner\\Documents\\ashwini\\ <\/strong>and the file name is<strong> xyz.txt<\/strong>. Let\u2019s see how can we open this file &#8211;<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfile=open(&quot;C:\\Users\\Owner\\Documents\\ashwini\\xyz.txt&quot;)\nprint(file.read())\n<\/pre><\/div>\n\n\n<pre class=\"wp-block-preformatted\">Output-\nThis is 1st line<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-must-read\"><span class=\"ez-toc-section\" id=\"Must_Read\"><\/span><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-orange-color\">Must Read<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"http:\/\/www.pythonpool.com\/python-lowercase\/\">How to Convert String to Lowercase in<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.pythonpool.com\/square-root-in-python\/\">How to Calculate Square Root<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.pythonpool.com\/python-user-input\/\">User Input | Input () Function | Keyboard Input<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.pythonpool.com\/python-book\/\">Best Book to Learn Python<\/a><\/li>\n<\/ul>\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>We now know how vital each operator in Python is. If there were no double slash operator in Python, it would have been challenging for us to print escape characters such as \u2018\\.\u2019 Not only this, but the concept of integer division has also proved to be very handy for programmers.<\/p>\n\n\n\n<p>Try to run the programs on your side, and let us know if you have any queries.<\/p>\n\n\n\n<p><strong><em>Happy Coding!<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python provides two different kinds of division \u2013 one is a floating-point division, and the other one is an integer division or floor division. If &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Working With Python Double Slash Operator\" class=\"read-more button\" href=\"https:\/\/www.pythonpool.com\/python-double-slash\/#more-3605\" aria-label=\"More on Working With Python Double Slash Operator\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":3614,"comment_status":"open","ping_status":"open","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":[1557,1563,1551,1545,1546,1564,1562,1565,1561,1549,1550,1556,1553,1544,1552,1548,1559,1558,1560,1554,1547,1555],"class_list":["post-3605","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-double-back-slash-in-python","tag-double-forward-slash-python","tag-double-foward-slash-python","tag-double-slash-in-python","tag-double-slash-python","tag-double-slash-python-filename","tag-print-double-slash-python","tag-python-double-slash","tag-python-operator-double-slash","tag-python-add-slash-to-double-quotes","tag-python-double-forward-slash","tag-python-double-slash-equals","tag-python-double-slash-operator","tag-python-double-slash-related-keywords-python-double-slash","tag-python-file-path-double-slash","tag-python-path-without-double-slash","tag-python-slash-vs-double-slash-windows-path","tag-what-does-double-slash-do-in-python","tag-what-does-double-slash-mean-in-python","tag-what-is-double-slash-in-python","tag-why-use-double-back-slash-in-python","tag-win32com-double-slash-excel-path-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>Working With Python Double Slash Operator - Python Pool<\/title>\n<meta name=\"description\" content=\"Python provides forward double slash operator integer division(non-floating values) and backward slash for using escape characters.\" \/>\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\/python-double-slash\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Working With Python Double Slash Operator\" \/>\n<meta property=\"og:description\" content=\"Python provides two different kinds of division \u2013 one is a floating-point division, and the other one is an integer division or floor division. If we want\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pythonpool.com\/python-double-slash\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Pool\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-16T09:17:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-01T07:49:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-17.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1001\" \/>\n\t<meta property=\"og:image:height\" content=\"605\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ashwini Mandani\" \/>\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=\"Ashwini Mandani\" \/>\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\/python-double-slash\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-double-slash\/\"},\"author\":{\"name\":\"Ashwini Mandani\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/8a75fb48eb1f3dc952df65a8c28ac056\"},\"headline\":\"Working With Python Double Slash Operator\",\"datePublished\":\"2020-07-16T09:17:46+00:00\",\"dateModified\":\"2024-01-01T07:49:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-double-slash\/\"},\"wordCount\":565,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-double-slash\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-17.jpg\",\"keywords\":[\"double back slash in python\",\"double forward slash python\",\"double foward slash python\",\"double slash in python\",\"double slash python\",\"double slash python filename\",\"print double slash python\",\"python \/\/ double slash\",\"python \/\/ operator double slash\",\"python add slash to double quotes\",\"python double forward slash\",\"python double slash equals\",\"python double slash operator\",\"python double slash Related Keywords: python double slash\",\"python file path double slash\",\"python path without double slash\",\"python slash vs double slash windows path\",\"what does double slash do in python\",\"what does double slash mean in python\",\"what is double slash in python\",\"why use double back slash in python\",\"win32com double slash excel path python\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.pythonpool.com\/python-double-slash\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pythonpool.com\/python-double-slash\/\",\"url\":\"https:\/\/www.pythonpool.com\/python-double-slash\/\",\"name\":\"Working With Python Double Slash Operator - Python Pool\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-double-slash\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-double-slash\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-17.jpg\",\"datePublished\":\"2020-07-16T09:17:46+00:00\",\"dateModified\":\"2024-01-01T07:49:17+00:00\",\"description\":\"Python provides forward double slash operator integer division(non-floating values) and backward slash for using escape characters.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pythonpool.com\/python-double-slash\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pythonpool.com\/python-double-slash\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/python-double-slash\/#primaryimage\",\"url\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-17.jpg\",\"contentUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-17.jpg\",\"width\":1001,\"height\":605,\"caption\":\"python double slash\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pythonpool.com\/python-double-slash\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pythonpool.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Working With Python Double Slash Operator\"}]},{\"@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\/8a75fb48eb1f3dc952df65a8c28ac056\",\"name\":\"Ashwini Mandani\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g\",\"caption\":\"Ashwini Mandani\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Working With Python Double Slash Operator - Python Pool","description":"Python provides forward double slash operator integer division(non-floating values) and backward slash for using escape characters.","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\/python-double-slash\/","og_locale":"en_US","og_type":"article","og_title":"Working With Python Double Slash Operator","og_description":"Python provides two different kinds of division \u2013 one is a floating-point division, and the other one is an integer division or floor division. If we want","og_url":"https:\/\/www.pythonpool.com\/python-double-slash\/","og_site_name":"Python Pool","article_published_time":"2020-07-16T09:17:46+00:00","article_modified_time":"2024-01-01T07:49:17+00:00","og_image":[{"width":1001,"height":605,"url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-17.jpg","type":"image\/jpeg"}],"author":"Ashwini Mandani","twitter_card":"summary_large_image","twitter_creator":"@pythonpool","twitter_site":"@pythonpool","twitter_misc":{"Written by":"Ashwini Mandani","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pythonpool.com\/python-double-slash\/#article","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/python-double-slash\/"},"author":{"name":"Ashwini Mandani","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/8a75fb48eb1f3dc952df65a8c28ac056"},"headline":"Working With Python Double Slash Operator","datePublished":"2020-07-16T09:17:46+00:00","dateModified":"2024-01-01T07:49:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pythonpool.com\/python-double-slash\/"},"wordCount":565,"commentCount":0,"publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"image":{"@id":"https:\/\/www.pythonpool.com\/python-double-slash\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-17.jpg","keywords":["double back slash in python","double forward slash python","double foward slash python","double slash in python","double slash python","double slash python filename","print double slash python","python \/\/ double slash","python \/\/ operator double slash","python add slash to double quotes","python double forward slash","python double slash equals","python double slash operator","python double slash Related Keywords: python double slash","python file path double slash","python path without double slash","python slash vs double slash windows path","what does double slash do in python","what does double slash mean in python","what is double slash in python","why use double back slash in python","win32com double slash excel path python"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pythonpool.com\/python-double-slash\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pythonpool.com\/python-double-slash\/","url":"https:\/\/www.pythonpool.com\/python-double-slash\/","name":"Working With Python Double Slash Operator - Python Pool","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pythonpool.com\/python-double-slash\/#primaryimage"},"image":{"@id":"https:\/\/www.pythonpool.com\/python-double-slash\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-17.jpg","datePublished":"2020-07-16T09:17:46+00:00","dateModified":"2024-01-01T07:49:17+00:00","description":"Python provides forward double slash operator integer division(non-floating values) and backward slash for using escape characters.","breadcrumb":{"@id":"https:\/\/www.pythonpool.com\/python-double-slash\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pythonpool.com\/python-double-slash\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/python-double-slash\/#primaryimage","url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-17.jpg","contentUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/07\/Capture-17.jpg","width":1001,"height":605,"caption":"python double slash"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pythonpool.com\/python-double-slash\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pythonpool.com\/"},{"@type":"ListItem","position":2,"name":"Working With Python Double Slash Operator"}]},{"@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\/8a75fb48eb1f3dc952df65a8c28ac056","name":"Ashwini Mandani","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g","caption":"Ashwini Mandani"}}]}},"_links":{"self":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/3605","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/comments?post=3605"}],"version-history":[{"count":6,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/3605\/revisions"}],"predecessor-version":[{"id":31470,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/3605\/revisions\/31470"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media\/3614"}],"wp:attachment":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media?parent=3605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/categories?post=3605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/tags?post=3605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}