This is the default comment for most popular Python IDEs like P圜harm, Sublime, VS code. Python multiline comment would look like to: # This Some languages like Java have native support for multiline comments. In Python there is a special symbol for comments which is #. How to comment out multiple lines in Python Multiline comment is created simply by placing them inside triple-quoted strings: '''/ """ and '''/ """.īoth examples have valid syntax in Python. Multiline comments in Python can start with ''' and end with '''. PEP 8 and bigger part of the community prefers to comment out like: # This is a comment One option is to add # at the start of each line. Python has several ways to comment multiple lines in Python.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |