python comment block

# You use a hastag at the beginning of the line to make anything after it a comment
'''
You can also make a multi line comment
With three single quotes at the beginning and end!
'''

4
1
Awgiedawgie 440220 points

                                    # This is a comment

""" This is a comment"""

"""
This is a comment
Also this is a comment
"""

4 (1 Votes)
0
4.33
6
Awgiedawgie 440220 points

                                    #This is a comment
#And another one
print("Hello !)  #Comment in the same line
      
"""
A multiline
comment
"""
print("Hello !)

4.33 (6 Votes)
0
3.86
7
Phoenix Logan 186120 points

                                    """
this 
is
a multiline 
comment
"""

3.86 (7 Votes)
0
4.13
8
Phoenix Logan 186120 points

                                    # one hashtag for a single line comment

"""
3 quote marks is technically
a docstring, but it works as
a multi line comment
"""

##pressing 'Alt 3' in IDLE comments out
##what you are selecting
and 'Alt 4' to uncomment

if False:
  print('Hello') # yes you can do it at the end of a line
  you can technically put if False around code you dont want it to run,
  but that would mean it has to have correct syntax,
  and would not be good for readability.

4.13 (8 Votes)
0
3.6
5
Awgiedawgie 440220 points

                                    select the lines you want to comment
and 'use Ctrl + / to comment all of the selected text'.
To uncomment do the same thing.
OR
put a '#' before each line

eg : #This is a comment

3.6 (5 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
comment python long comments in python paragraph comment in python commenting in python python comment lines of code comment code in python comment a block in python block comments in python make comment in python comment out text in python python how to block comment comment a block of code in python comments in python how to add comment in python comment out in python block of comment python how to block comment in python comment line in python block comment python how to make everything a comment in python how to comment a block of code in python comments in pythoin python make section comment python comments block commenti python how to mass comment in python comments pythin comments python remove all comment from python file online python how to comment out a block python comment out section python comments python comment how to write comment in python python block comment how to put comments in python python comment block pyhton comment how to type comment in python how to comment a function in python comment section in python comment blocks in python comment out full string comment blocks python how to write comments in python python commentar how to create comment in python comments in python 3 how do you comment in python write comments in python python big comment python comment out multiple block of code python comment large area python comment a block of code how to give comment in python program how to comment out in python how to comment code in python python comment within line comment big section python python comments """ python comment section how to write long comments in python what is a comment in python comment block python python add a comment comment python code how to comment python how to select code and comment it in python coments python python large comment Commentary python python Remarks python comment line how to comment python3 comment multiple lines python how to add comments in python how to leave comments in python how to comment all of the selected text in python comment out a block in python how to comment in python python how to comment comment in python
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