Multi-line docstrings
Sometimes single-line docstrings are sufficient, but if your function is more complex or has several arguments, then it is generally a better choice to include a multi-line docstring.
You'll practice this by creating a multi-line docstring for the clean_text() function you made earlier.
Bu egzersiz
Intermediate Python for Developers
kursunun bir parçasıdırUygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
def clean_text(text, lower=True):
# Add a multi-line docstring
"""
____
"""
clean_text = text.replace(' ', '_')
if lower == False:
return clean_text
else:
return clean_text.lower()