+ 2

I don't understand triple quotes, what do they do?

16th Aug 2016, 11:20 PM
Darth Vador
Darth Vador - avatar
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
17th Aug 2016, 12:22 AM
King Coder
+ 1
triple quote is like # where we comments on our command, made reader understand its meaning
17th Aug 2016, 2:21 AM
Shubham Kapoor
Shubham Kapoor - avatar
+ 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.
17th Aug 2016, 11:44 AM
Josip Komljenović
Josip Komljenović - avatar
0
Thank you!
17th Aug 2016, 12:47 AM
Darth Vador
Darth Vador - avatar
0
You're welcome
17th Aug 2016, 1:01 AM
King Coder
0
I don't
24th Aug 2016, 12:24 AM
Betsy Brody
Betsy Brody - avatar