Difference between # and """ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Difference between # and """

What is the difference between between # and """? Which situations would exist in which one is used over the other?

18th Aug 2016, 11:16 PM
Devon McCauley
Devon McCauley - avatar
5 Answers
+ 1
And what is their different syntax?
18th Aug 2016, 11:16 PM
Devon McCauley
Devon McCauley - avatar
+ 1
So basically they are both used to write comments but """ is used to block out multiple lines for commenting while # can be used directly after code or just on a new line blocking out only one line for commenting Usage: Code Code """ Comments Comments """ Code # comments Code # comments
19th Aug 2016, 1:19 AM
Michael
+ 1
Ahh! Ok:p Thank you! I appreciate it
19th Aug 2016, 1:24 AM
Devon McCauley
Devon McCauley - avatar
+ 1
No problem!
19th Aug 2016, 1:26 AM
Michael
0
# is use for making a single line comment whiles "" is using for commenting multiple lines.
19th Aug 2016, 5:47 PM
wahab moro