0

What is triple docstring used to ?

Python

9th Dec 2020, 8:17 AM
Low Ze Xuan
4 Respuestas
+ 5
To write/comment MULTIPLE LINES without the use of \n Example (string) print("""Hello Hi World""") Example (comment) def add(x, y): """ This adds two numbers """ return x + y
9th Dec 2020, 8:28 AM
noteve
noteve - avatar
+ 5
You mean: """Something like this?""" its a convention for docstrings and multiline comments
9th Dec 2020, 8:28 AM
Slick
Slick - avatar
+ 3
Tag a relevant language (Python) rather than 'everyone' please ☝
9th Dec 2020, 8:46 AM
Ipang
+ 1
Oktq
9th Dec 2020, 9:32 AM
Low Ze Xuan