{"id":400,"date":"2024-07-15T12:34:25","date_gmt":"2024-07-15T07:34:25","guid":{"rendered":"https:\/\/augurytech.co.uk\/courses\/?p=400"},"modified":"2024-10-05T09:06:09","modified_gmt":"2024-10-05T04:06:09","slug":"python-comments","status":"publish","type":"post","link":"https:\/\/augurytech.co.uk\/courses\/python\/python-comments\/","title":{"rendered":"Python: Comments"},"content":{"rendered":"\n<ul class=\"wp-block-list\">\n<li>Comments are <strong>lines of text<\/strong> in your code that <strong>Python ignores<\/strong>.<\/li>\n\n\n\n<li>Comments are <strong>for the human<\/strong>, not the machine.<\/li>\n\n\n\n<li>For example, a comment can <strong>explain a section of code<\/strong> so another programmer can understand it.<\/li>\n\n\n\n<li>A comment can help you figure out your code when you come back to it a month or a year later.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Types of Comments<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Single Line Comments:<\/strong>   A single line can be commented by using a # symbol<\/li>\n\n\n\n<li><strong>Paragraph\/Multi-line Comments:<\/strong> A paragraph can be commented by using a triple quote<\/li>\n<\/ul>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-fe9cc265 wp-block-group-is-layout-flex\">\n<h2 class=\"wp-block-heading\">Syntax<\/h2>\n\n\n\n<pre class=\"wp-block-code\" style=\"margin-bottom:var(--wp--preset--spacing--20);padding-top:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);font-size:clamp(1.125rem, 1.125rem + ((1vw - 0.2rem) * 0.612), 1.5rem);\"><code>#This is a single line comment<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\" style=\"margin-bottom:var(--wp--preset--spacing--20);padding-top:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);font-size:clamp(1.125rem, 1.125rem + ((1vw - 0.2rem) * 0.612), 1.5rem);\"><code>\"\"\"\nThis is a multiple line comment\nwritten in\nmore than one line\n\"\"\"<\/code><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Types of Comments Syntax<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"wp-custom-template-python","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":""},"categories":[5],"tags":[],"class_list":{"0":"post-400","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-python"},"_links":{"self":[{"href":"https:\/\/augurytech.co.uk\/courses\/wp-json\/wp\/v2\/posts\/400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/augurytech.co.uk\/courses\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/augurytech.co.uk\/courses\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/augurytech.co.uk\/courses\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/augurytech.co.uk\/courses\/wp-json\/wp\/v2\/comments?post=400"}],"version-history":[{"count":5,"href":"https:\/\/augurytech.co.uk\/courses\/wp-json\/wp\/v2\/posts\/400\/revisions"}],"predecessor-version":[{"id":407,"href":"https:\/\/augurytech.co.uk\/courses\/wp-json\/wp\/v2\/posts\/400\/revisions\/407"}],"wp:attachment":[{"href":"https:\/\/augurytech.co.uk\/courses\/wp-json\/wp\/v2\/media?parent=400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/augurytech.co.uk\/courses\/wp-json\/wp\/v2\/categories?post=400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/augurytech.co.uk\/courses\/wp-json\/wp\/v2\/tags?post=400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}