Python 3 All Types of Comments & MultiLines Strings & Docstring With Examples
136 views
Jun 3, 2025
Get the full source code of application here:
View Video Transcript
0:00
uh hello guys welcome to this video So
0:02
in this video I will show you all types
0:04
of comments inside uh Python Whenever
0:06
you're developing a Python application
0:08
there are lots of comments which are so
0:12
the normal comment is there You just put
0:14
the hash sign and then this is a
0:17
singular comment So this is a simple
0:20
comment
0:22
inside and let's suppose there are also
0:25
inline comments as well So which you can
0:28
even write like this This is a print
0:39
statement So if I execute this uh Python
0:42
script what will be the output here you
0:44
will just see the comments will be
0:46
ignored and the output will be hello
0:49
world Hello world again So these
0:51
comments right here is ignored You put
0:53
the hash sign or you can put double hash
0:57
sign All these are treated as comment It
1:00
will change to green color and this is
1:01
actually your
1:03
comment So either you can put one hash
1:06
sign or you can put double hash sign as
1:10
well
1:12
So but this will give me an error error
1:17
here syntax error because this is not a
1:20
comment So for this to be a comment you
1:22
need to put this hash sign This will
1:24
change it to comment This is singular
1:27
and inline comment But if you want to do
1:29
multiple line comment you simply
1:33
say three double quotes like this So
1:37
this is your multi-line
1:39
comment This is a multi-line comment
1:50
So now if you execute the script here
1:53
you will see it will safely
1:57
execute You will see that all this
2:00
multi-line comment is ignored here You
2:02
will see inside
2:05
Python So there are multiple forms of
2:08
comments here This is the most used
2:11
comment which is inline
2:13
comment or this like this But if you
2:16
want to do multiple lines of comment you
2:19
put this inside this three double single
2:24
quotes and inside this you write your
2:26
comment So these are two different kinds
2:28
of comments
2:30
multi-line and uh a singular line
2:32
comments inside
2:34
Python And uh that's all that is there
2:38
Thank you very much for watching this
2:40
video and also check out my website
2:42
freemediattools.com
2:44
uh which contains thousands of tools
#Programming
#Scripting Languages