



{"id":8424,"date":"2026-04-30T19:30:15","date_gmt":"2026-04-30T14:00:15","guid":{"rendered":"https:\/\/computersirkiclass.com\/cskc\/?p=8424"},"modified":"2026-10-02T18:39:21","modified_gmt":"2026-10-02T13:09:21","slug":"what-are-python-keywords-2-2","status":"publish","type":"post","link":"https:\/\/computersirkiclass.com\/cskc\/what-are-python-keywords-2-2\/","title":{"rendered":"Python &#8211; Escape Sequences"},"content":{"rendered":"<div id=\"modal-ready\">\r\n<p class=\"wp-block-paragraph\">We need a special trick to display certain characters. This is known as the escape sequence pattern.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-table\">\r\n<table class=\"has-fixed-layout\">\r\n<tbody>\r\n<tr>\r\n<td><strong>Escape Sequence<\/strong><\/td>\r\n<td><strong>Meaning<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\\\<\/td>\r\n<td>Displays single backslash \\<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\&#8217;<\/td>\r\n<td>Displays single quote<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\&#8221;<\/td>\r\n<td>Displays double quote<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\a<\/td>\r\n<td>Plays an audible bell tone. Doesn&#8217;t affect display<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\b<\/td>\r\n<td>Moves the display pointer or cursor one place back<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\f<\/td>\r\n<td>Form-feed. Works on page printing devices to move to next page<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\n<\/td>\r\n<td>Gives one linefeed. In practical implementation this moves pointer to first column of next line<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\r<\/td>\r\n<td>Gives carriage return. It moves the pointer to to first column of current line<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\t<\/td>\r\n<td>Horizontal Tab. Moves the pointer to 8 spaces further. Characters before this are counted as part of this 8 count.<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\v<\/td>\r\n<td>Vertical Tab. This gives vertical line feed equal to number of lines specified by implementing devices.<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\ooo<\/td>\r\n<td>Character with octal value ooo\u00a0 (Upto 3 octal digits accepted, For less digits prefill with extra 0s)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\xhh<\/td>\r\n<td>Character with hexadecimal value hh (exactly 2 hex digits are required)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\uxxxx<\/td>\r\n<td>Character with 16 bit unicode value xxxx (exactly 4 he digits)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\Uxxxxxxxx<\/td>\r\n<td>Character with 32 bit unicode value (exactly 8 hex digits)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\N{name}<\/td>\r\n<td>Fills name fetched from unicode database<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>\\&lt;followed by newline&gt;<\/td>\r\n<td>Special escape sequence to create logical lines based on multiple physical lines.<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/figure>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">The original python document for above can be referred from <a href=\"https:\/\/docs.python.org\/3\/reference\/lexical_analysis.html#string-and-bytes-literals\">https:\/\/docs.python.org\/3\/reference\/lexical_analysis.html#string-and-bytes-literals<\/a><\/p>\r\n<\/div>","protected":false},"excerpt":{"rendered":"<p>We need a special trick to display certain characters. This is known as the escape sequence pattern. &nbsp; Escape Sequence Meaning \\\\ Displays single backslash \\ \\&#8217; Displays single quote \\&#8221; Displays double quote \\a Plays an audible bell tone. Doesn&#8217;t affect display \\b Moves the display pointer or cursor one place back \\f Form-feed. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":9792,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[114,244],"tags":[],"model_paper":[],"class_list":["post-8424","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cnr","category-python","python_index-101020-fundamental-concepts","board-cbse-083-computer-science","board-python"],"acf":[],"_links":{"self":[{"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/posts\/8424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/comments?post=8424"}],"version-history":[{"count":2,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/posts\/8424\/revisions"}],"predecessor-version":[{"id":9793,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/posts\/8424\/revisions\/9793"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/media\/9792"}],"wp:attachment":[{"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/media?parent=8424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/categories?post=8424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/tags?post=8424"},{"taxonomy":"model_paper","embeddable":true,"href":"https:\/\/computersirkiclass.com\/cskc\/wp-json\/wp\/v2\/model_paper?post=8424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}