+ 2
I don't understand triple quotes, what do they do?
6 Réponses
+ 1
Triple quotes are used if you don't want to use \n, just press the Enter key on your keyboard and in Python the line will be automaticaly. \n'ed
+ 1
triple quote is like # where we comments on our command, made reader understand its meaning
+ 1
btw when you write function or class at the beggining of it you use '''some text'''.
Example
def foo():
'''bar''' #probably the most useless function ever written
and now you can write
print(foo.__docs__) and the output will be 'bar'
and that is what you use ''' for.
0
Thank you!
0
You're welcome
0
I don't