0
What is triple docstring used to ?
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
+ 5
You mean:
"""Something like this?"""
its a convention for docstrings and multiline comments
+ 3
Tag a relevant language (Python) rather than 'everyone' please ☝
+ 1
Oktq