+ 2
What's the point of putting three sets of quotes?
3 Answers
+ 4
Python provides three ways to add comments to your program :
1. #(hash symbol)
eg: #this is a comment which will not get printef in the console
2. '''(three single quotes)
eg: '''this is second set of comments'''
3. """(three double quotes)
eg: """this is 1st line of comments
this is 2nd line of comments"""
The third way of adding comments(which you are referring to) can be perfectly used to explain certain function in your program,overall prgm description etc in paragraph form
0
Also while writing classes, you will also be writing something called doc strings.. that is where u will be using them intensively..
0
Mostly I used it for documentation. But other purpose is to create string text