Documenting a Function in Python: DOCSTRING in Python - Python Tutorial for Beginners

Documenting a Function in Python: DOCSTRING in Python - Python Tutorial for Beginners {Celebrity |Famous |}%title%{ Net Worth| Wealth| Profile}
YouTube Excerpt: πŸŽ“ Welcome back to Digital Academy, the Complete Python Development Tutorial for Beginners, which will help you Learn Python from A to Z! πŸ–₯️ Documenting your Code in Python: Docstring in Python Although optional, documentation is a good programming practice - especially if you want to get your dreamed job at Google, Apple, Facebook or anywhere in the World! Plus, unless you can remember what you had for dinner last week, always documenting your code will help you a lot when you will need to stay away for a while, then come back. You can attach documentation in Python to a function definition by including a string literal called docstring, just after the function header. It is briefly used to explain what a function does. β—‹ What is a Docstring in Python? A docstring is a string literal that occurs as the first statement in a module, function, class, or method definition. Such a docstring becomes the __doc__ special attribute of that object. Note: Docstrings in Python are usually triple quoted, to allow for multi-line descriptions. β—‹ Documenting your Code in Python: Docstrings in Python def hello(): """This function prints message on the screen""" print('Hello, World!') β—‹ Print Function Help (Rich format) To print a function’s documentation, use the Python help() function and pass the function’s name as parameter. help(hello) # Help on function hello in module __main__: # hello() # This function prints # message on the screen β—‹ Print Function Help (RAW format) You can also access the docstring in Python through __doc__ attribute of the function. print(hello.__doc__) # OUTPUT: This function prints message on the screen Let's play this video, stick around and watch until the end of this video! πŸ‘πŸ» - Digital Academyβ„’ πŸŽ“ *** ☞ WATCH NEXT: β—‹ Data Types in Python - https://youtu.be/cweUByxBWiU β—‹ Operators in Python - https://youtu.be/-wDaVLkKOiU β—‹ IF Statements in Python - https://youtu.be/CC5seZ6OBJ4 β—‹ FOR Loops in Python - https://youtu.be/JgH-D5DSTho πŸ“– Blog: http://digital.academy.free.fr/blog πŸ“– [FULL Course] HOW TO Learn Python? Python Tutorial for Beginners: https://youtu.be/9hvnSZPMtuw πŸ“– [PLAYLIST] Complete Python Development Course for Beginners: http://digital.academy.free.fr/playlist/python-development-for-beginners πŸ§‘β€πŸŽ“ [COURSE] http://digital.academy.free.fr/courses πŸ“˜ [BOOK] Python for Absolute Beginners: https://amzn.to/3NvyOWV πŸ›’ Shopping and Discounts: http://digital.academy.free.fr/store πŸ’Œ Weekly Newsletter for Developers: https://www.getrevue.co/profile/digital_academy #Python #Tutorial #Beginners #Shorts *** β™‘ Thanks for watching and supporting β™‘ Please Subscribe. Hit the notification bell. Like, Comment and Share. *** β™‘ FOLLOW US β™‘ ✧ http://digital.academy.free.fr/ ✧ https://twitter.com/DigitalAcademyy ✧ https://www.facebook.com/digitalacademyfr ✧ https://www.instagram.com/digital_academy_fr/ ✧ https://www.youtube.com/c/DigitalAcademyOnline β™‘ SUPPORT US β™‘ ✧ http://digital.academy.free.fr/join ✧ http://digital.academy.free.fr/store ✧ http://digital.academy.free.fr/donate ✧ http://digital.academy.free.fr/subscribe ✧ https://www.patreon.com/digital_academy ✧ https://www.buymeacoffee.com/digital_academy ***

πŸŽ“ Welcome back to Digital Academy, the Complete Python Development Tutorial for Beginners, which will help you Learn Python from A to Z! πŸ–₯️...

Read Full Article πŸ”

Curious about Documenting A Function In Python: DOCSTRING In Python - Python Tutorial For Beginners's Color? Explore detailed estimates, salary breakdowns, and financial insights that reveal the full picture of their profile.

color style guide

Source ID: XPK6R19igs8

Category: color style guide

View Color Profile πŸ”“

Disclaimer: %niche_term% estimates are based on publicly available data, media reports, and financial analysis. Actual numbers may vary.

Sponsored
Sponsored
Sponsored