View the Python help document on the command line--dir, helps, __doc__

Source: Internet
Author: User
Tags documentation

1 The Dir function can view the properties of an object, and in Str, for example, enter Dir (str) to see the properties of Str. The following figure

2 How to view the Help document for a property of an object. How to view the capitalize properties of STR, you can use __doc__, using the method of print (srt.capitalize__doc__), as shown in the following figure



3 View Object properties can also use the Help function, using the method of Help (Str.capitalize), the following figure



4. View detailed documentation for an object with help, such as a detailed document that looks at the STR type, can be used with (str). If there is a lot of content in the document, help lists part of all the documentation and prompts "-more-" in the lower left corner, press ENTER to display more information, and to return to command-line interaction mode, press CTRL + C.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.