![]() |
|
[Python] Single Line Comments and Multi-Line Comments - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] Single Line Comments and Multi-Line Comments (/showthread.php?tid=4910858) |
Single Line Comments and Multi-Line Comments - Spider Venom - Jul 17, 2015 What is the difference between Single Line Comments and Multi-Line Comments? I just don't see the use for "" when # works just fine. * - Introvert - Jul 17, 2015 There really is no difference. Multi line comments are just handier to use when writing long blocks of text which span across multiple lines. Python actually has no real concept of multi line comments like other languages do. Instead it has triple quotes, which can also be used as docstrings. PEP8 reccomends to just use single line comments, so I guess just stick with those. Unless you are writing a docstring, of course. |