python multi comment

# While Python doesn't support multi-line comments, it can ignore anything
'''
inside a multi-line string!
Just wrap the comment in the three single quote marks,
And
you're
good
to
go!
'''

4.67
3
Krish 100200 points

                                    # Python is a language that doesn't support multiline comments
# In languages like JS, single line comments have // in the beginning
# and multiline comments have /* in the beginning
# and */ in the end
# the pound symbol in front of these five lines is the python equivalent of //
print("But there is a workaround!!!")
"""
In python, multiline string is written with 3 double or single quotes, 
and the characters in between are treated as an entire string
but, if this string isn't assigned to a variable, python doesnt give any error
It instead ignores the string, similar to the behaviour it would have 
towards a comment. 
BUT!!!!!
If this is string is put just after defining a function, it is treated as a 
docstring, or the documentation string of that function. So, it does have a 
meaning and is not exactly ignored by Python
"""
def someFUnc():
  """
  Python will treat this as a docstring
  """
  pass

print(someFUnc.__doc__)

# OUTPUT:
#   Python will treat this as a docstring

4.67 (3 Votes)
0
3.67
3
Awgiedawgie 440220 points

                                    #%% There are not multiline comments in python,
# this # is the only form of commenting but, people use
# """triple quotes""" for multiline commenting but this
# is actually a String the interpreter will read and 
# will ocupy memory. If you dont put this kind of string
# into a variable it will be collected on execution

3.67 (3 Votes)
0
4.25
4
Awgiedawgie 440220 points

                                    # Python doesn't support multi-line comment blocks out of the box.
# The recommended way to comment out multiple lines of code in Python is
# to use consecutive single-line comments.
# feelsbadman

4.25 (4 Votes)
0
0
0
Awgiedawgie 440220 points

                                    """Put comments inside triple quotes"""

0
0
3.67
3
Awgiedawgie 440220 points

                                    #There is no way to comment multiple lines in Python.
#You just keep using "#" symbol to comment each line out.

'''
Technically you could also use triple single quotation
marks like so, but this formatting does not count
as "true" source code comments that are removed by
a Python parser.
'''

3.67 (3 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
how to make comments in python multiline multilne comments python comments multiple line in python python multiline commentss notation how to write comment inside multiline code in python Python have a multi line comment function how to make multi-line comments in python multiple line comment out in python multiline comments python code multiline comment pythonn Python program to print the multiline comment how to add multi line comment in python how to add single-line comment in python commnt multiple lines python multiline python commends comment out several lines python multi line commentpython python multiline code comment python multiline coment hwo to multiline comment in python how to do a multi-line comment in python comments in python multiple how to declare multiple line comment in python python how to do a multi line comment multi row comment python multiline coment in python multline comment in python comment several lines in python hwo to single line comment multiple lines in python multi lline comment python multi line list or comment in py python multiple row comment out shortcut to comment out multiple lines in python python multiple line comments how to mulit comment python how to make multline comment python multiline commentrs on pyhton How to add single-line comment in Python? python muliline comment several line in python comment does python have a multiline comment function how to write a multiple line comment in python python commend out multiple lines of code how to write multiline comment in python how to make multiple line comment in python multyline comment in python multi line comment py how to write to write multiline comment in python comment out multi line python example of single-line comment in python commenting many lines in python to comment multiple lines in python comment out mupltiple lines of code pythod the multi string comment python python mulitline comments multiline comment pytohn how to give multiple line comment in python comment several lines python multiline comment oyhon Multiline comments • Python import statement. commenting multiple line in python Single-line comment in Python how to comment multilines lines at once in python python comment several lines comment multiline python python commenting multiple lines how to comment more than one line in python how to write multiple lines of comments in python how to comment out multiple lines of code in python multiline comemnt python how to coment multiple lines pytho comment out mutlip lines python multi line comment in python 3 comments in python multiple lines shortcut for commenting multiple lines in python comment multipleline in python multiline comment in python 3 mulitline comment python python mulitline comment how to do a multiline comment in python how do you make multi line comments in python multy line comment in python python type comment multiple make comment spanning multiple lines in python python multi level comment python muiltline comment how to comment single line in python python 2 lines after comments commenti multilinea python commenting multiple lines in python in windows comment multiple lines at a time python multiline comment inpython does python support multiline comment muiltline comment in python python multi-line comment multiple lines comment python mutiline comment python multline comments python set mulitple lines in comment python python multi comment comment multiple lines python shortcut how to comment several lines in once in python commento multilinea python python idle multiline comment multiline comment in python uses way to comment out multiple lines python how to comment multiple lines together in python how to commen multiple lines together in python multiline comments in Python? multie line comment in python pythin comment out multipel lines python comment ouy multiple lines multi line comments python how to make a multi row comment in python comment multople lines of code python how to do double line comment in python comment multiple lines pythpn multiline comment python 3 how to add multiple comments in python commentaire python multi-line how to multi row comment python python multi lien comment hoe to multiple line comment out i python python multiline comment block how to make comment multiple lines in python multi line comment python 2 python comment multi line comment out multiple lines python multiple comments python how to comment multiple lines in python shortcut python how to comment several lines python how to comment out multiple lines multi comment line in python how to comment many lines in python using / comment out python multiple lines muliline comment python how to comment on multiple lines in python single line comment in python multiline comment py multiline comment # in python how to add multiline comment in python comment multiple lines of code in python comment many lines in python commenting multilines in oython more line comment python multi line commet in python multiline comment in pythonh single line and multiline comments in python comment multiñline python is there multi line comment in python? multi lne comment in python how multi line comments in python block multiple comment python single line comment python python more line comment how to comment multiline in python multi line coment python how to comment multiple lines string in python multy line comments in python how to do multiline comment in python commenting several lines on python how to multiline comment command in python python has multiline comments comment multple lines python how to add multiple line comments in python how to multiple line comment in python how to comment out multiple lines of code python how to comment out multiple lines with # in ython how to comment in multiple lines in python multilien comment in python multi line commenting python python comment multple lines how to put multiple comment in python comment python several lines comment multiple lines in python # multi line python comment does python have multiline comments comment multiple lines in python at once how to multiline comment in python 3 how to comments more than 2 lines in python multiple commenting out in python comments in python multiline python3 multiline comments python multiples lines coment how to make comment on python more than 1 line inline and multiline comments python how to do multi line comment in python multiline coments in python Which of the following is used to make multiline comment in Python? comment various lines python use a multiline string to make the multi line comment in python standard way to make multi line comment in python multi comment python how to comment many lines of python at once multiple comments in python easiest way to comment multiple lines in python multi lined comments python multiline comment pythomn comment multiple lines in python shortcut comment more than one line python multiline comment in python with *\ multi line comment in pythomn multiline comment in pythn comment out multiple lines python windows python get multiline comment python single line comment making multiline comment in python how to give multiline comment in python comment many lines python how to commennt multiple lines in python at once python commenti multilinea how to make single line comment in python Which character is used in Python to make a multiople line comment? how to comment multi line in python commenting out multiple lines in python how to write multi line comment s python comment more lines python python 3.8 multiline comment python multi line comments inspect function ignore multiline comment comment multiple lines in python shortut how to use multiline comment in python how to turn multiple lines into comments in python python multi line commentsw multiline comments python multiline comments pyton how to make a multiline comment python python multi line code commenting how to comment multiple lines in python at once mult line python comment how to multiple comment in python commenting in python multiple lines comment more than one line in python how to comment multiple lines of code in python multistroke comment in python how to comment out few lines in python do python have multiline comment python large comments How do you include multi line comments in python? optimal multiple line comment in python commenting code python with quotes how to make multiple lines comment in python subline text python string ignore comment newline python python multiple comments python multi coment python string over multiple lines comments python muliti line commen how to pt a multi line comment in pytohn how to make lines of code comment in python python comment out python comment section python many lines to comment python how to do multi line comment long comments in python how to comment out in python with multiple lines pycharm comment multiple lines python comment multiple lines shortcut block aa lot of lines in python multiline commnet python one line comment python python commeny how to multi comment in python how to comment more than one line in python once python comment long python comment paragraph how to make mutiline comment in python python note multiple lines how to comment out everything in python commenting a section in python python make multiline comment comment all python hash multiple lines python comments in a multiline string python how do you comment out sections of code python comments python multiple lines python comment blocks why doesn't python have multiline comments multi line cooment in python commenting a large strinfs in python comment block python how to do a multiline comment python how to have multiple lines of comment in python ghow to do multi comment in python multiline cmments python python comment selected lines multi multi line comments in python 3 python comment block python block commetn A Python paragraph(multi-line) comment uses the style how to coment many lines at once imn py python create multiline comment comment sections python how to make multi line comment in python how to make multiline commet python do multiline comments many line comment in python how to comment out many lines in python multiple line comments in python bulk comment in python how to comment multiple lines in python django multi comment in python comment out in python python multiline comment shortcut multi line ocmments python comment out multiple liunes python python fast way to comment multiple lines comment multiple codes in python how to make a multi comment in python python code comment multiple lines multiple line comment python multiple line comment in pyton python comment many lines comments in python for paragraph multi level comments in python make several lines comment python pyton multi line comment how to comment multiple lines python uncomment triple double quotes in python uncomment triple double quotes the code in python how to comment a bunch of lines in python make more than one line of code s comment in py python multiline commenting multiple comment lines in python how to do multiple line comment in python comment in python3 how to comment multiple line in python shell python comment in multiline string python put lines in comment comment block in python how to write multi line comments in python syntax for single line comment in python python pep8 multi line comment python block comments python mylti line comment comment multiple linews python PYTHON MULTILANE COMMMENT how to comment many lines in python python comment multiline instruction multi line comment in python' py multi line commend how to create multi-line strings as comments in sublime text for python how to make multiple line comment in sublime text with triple quotes multiline comment in pt block comments python python multline comment how to comment a section in python comment multiline string python how to comment out multiple lines in python long comments in python syntax multi line comment python does Python have a multi line comment function? python long comments how to multiline comment in python how to mass hide multuple lines in python comment multi line python how to comment several lines in python python 3 block comment py multiline comment how to comment a paragraph in python multi lines comment in python pyhton multiline comment multi line comment pyhtohn python comments multi lines how to multilibne comment in python python how to make multiline comment multiline comment python' comment multiple lines # python how to make multiline comments in pytho how to comment multiple lines comment block of line in python comment a whole section in python different ways to do multi line comment in python comment syntax for one line in python multi block comment python multiple row comments in python multiline comment in pyhton python comments triple quotes block comment python multiline comment comment out multiple lines in python comment multiline in python multiple line comments in colab texbox commenting more than one line in python use a multiline string to make the multi line comment how to comment multi line multi-line comments python multiline line comment in python document.paragraph.comment python commenting multiple lines in python 3 commenting in python 3 group comment python how to make a hole parragraff a comment python styling multi line comments in python commenting three lines in python mutli line comment python python mutliline comment mutiline comments multi line comment Python multi lined comments how to comment lines in Python multi line commens python how to comment set of lines in python how to add multiline comments in python multi-line comment in python few line commennt py multi comments in python long line comments python group comment in python coomment multiple lines inpython script multi loine comments python multi line notes python comment some lines pythonç how to make a long comment in python how to add comments to a long line python how to add comment in multiple line how to make multiple lines comment in python generate the multiline comment in python multiple lines comments in python symbols for multiline strings and comments in python; python comment multiple lines lines python using triple quotes as comments python multispace comment how to comment whole code in python multi line comment pyython how to add # multiple line comment in python how comment multiple line in python multi libe coommecnt python commenting multiple lines in python3 python mutliline comments python comment all lines how to comment a multiple lines in python python multiline commetns code fights comment multi line how to comment multiple blocks in python python comments multiline shortcut to comment multiple lines in python how to do a multi line comment in python python mul;ti line comment python commend multipul lines multiple lines python vs in note python triple quote comment python mult line comment python comments in quotes comment block of lines python add block comment in python python multiline comment]\ python multilinecomment multiline comment in python keys multiline python comment how to make a multiline comment in python How to have long comment python how to print a multi line comment in python command how to print a multiline comment in python command python multi line commen long comment python how to comment all lines in python python do not comment the whole line python multiple lines comments comment out code chunks in python python multiple comment line /* in python how to make multiline comments in python long comment in python block section python multi line commment in python multi-line comments in python miultiline comment python how to add multi lune comment python multi line commend python how to wrap multiple rows of code in a comment in python multiline commenting in python how to write a multi line comment in python how to comment multiple line python comment out python python comment out whole section multiline comment python\ multiline comments in python 3 python multiline comment fomatr python multiline comment parameters all comment in python python comment multi lines python can you multiline comment with single quotes python multiline comments python how to comment multiple lines multiline comments in python python block comments example how to print multi lines comment in python commenting multiple lines of code in python how long to make comment lines in python python comment out multiple lines Python multiline comments. python how to put multiple lines of comment multiple line comment in python how to add paragrpah comments in python python multi-line commenting python pragraph comment multiline comment in python python long comment how to make multiple lines of code comments in python python multi linecooments how to make lines comments in python multiple comment line in python multiple comment in python python multi comment line python multiple lines comment python multiple line comment python multi line comment write comment insode multi line expression pythion how to comment multiple lines in python python multi row comment how to comment out an entire section in python putting lots of lines under comment together python how to make multiline comment in python python multy line comment how can make block as comment in python with one click with # python multiline comment syntax multi line comments in python comment bunch of lines python python bulk comment how multiple line comments python python multi-line comments command to comment out multiple lines in python command to comment multiple lines in python how to add multiple line comment in python make many lines comments python how to make multiple comments in python how to write multiple line comments in python Python have a multi line comment function? comment python multiple lines python multiple Comment multiple comment line python 3 multi line comment in python multiple lines comment in python python comment multiline comment python multiline comment multiple line python commenting multiple lines in python comment on multiple lines python commenting in python for more than 1 line comment multiple lines python how to make multiple line comments in python using # how to make multiple line comments in python multy comment python comment multiple line in python note out multiple lines python how to write mulyiline comments in python commenting every line in python how to make multi line comments in python how to make a multi line comment in python how to comment in python multiple lines why are there no multiline comments in python how to multi line comment in python comment all lines in python multi-comment python multiline comment python comment multiple lines in python how to comment more lines in python how to hash out multiple lines in python python block comment python comments block python multiline comment multi-line comment python how to havea multiple line comment in python python comments multiple lines python comment multiple lines
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source