+ 2

What's the point of putting three sets of quotes?

1st Sep 2016, 2:48 PM
DELETED
3 odpowiedzi
+ 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
1st Sep 2016, 5:15 PM
Simran Madhok
0
Also while writing classes, you will also be writing something called doc strings.. that is where u will be using them intensively..
2nd Sep 2016, 4:28 AM
arvindh
arvindh - avatar
0
Mostly I used it for documentation. But other purpose is to create string text
2nd Sep 2016, 10:39 AM
Ahmad Syarif
Ahmad Syarif - avatar