Python mac for beginners youtube

broken image
broken image

This method creates a text constant with no function, not a true comment. If you don’t, you will see a syntax error. Note: It is important that you correctly indent the triple-quote mark. They aren’t parsed and interpreted by the compiler. Instead, use multi-line strings wrapped inside triple-quote marks ( ''') to achieve a similar function. Multi-line strings do not work as traditional Python comments, since there is no official multi-line functionality. In such instances, you can use multi-line comments. However, commenting a large section takes a lot of time and you may need a quick way to comment out a whole section. In general, it is recommended to use # at the beginning of each line to mark it as a comment. These tools can save you time commenting out each line. Some text or code editors for programming (like Notepad++ or Atom) allow you to highlight the text, then mouse-click to mark the block as a comment.

broken image

To mark a series of lines as a comment, add a hash sign + space at the beginning of each line: # This is a comment A developer uses them to explain more complex code, especially when working in a team.

broken image

Block comments are longer-form comments that consist of multiple lines in a row.