সকল ফাংশনের একটি বিল্ট-ইন অ্যাট্রিবিউট থাকে __doc__, যা ফাংশন সোর্স কোডে ডিফাইন করা ডকস্ট্রিং রিটার্ন করে।
def foo():
""" This is an example of how a doc_string looks like.
This string gives useful information about the function being defined.
"""
pass
print foo.__doc__
এটি প্রিন্ট করলে কী দেখাবে -
This is an example of how a doc_string looks like.
This string gives useful information about the function being defined.