How to view the Python Help document in command-line mode---dir, assist, __doc__

Source: Internet
Author: User

How to view the Python Help document in command-line mode---dir, assist, __doc__

1, the Dir function can view the properties of the object, the use of the method is very simple, for example, the str type, enter DIR (str) in the Python command window to see the properties of STR, as shown in:

2. How can I view the help document for an object's properties? To view the split property of STR, you can use __DOC__ with the method print (str.split.__doc__), as shown in:

3. You can also use the Help function to view a property of an object, using the method Str.split, as shown in:

4. To view detailed documentation of an object with help, such as viewing a detailed document of the STR type can be used in the helps (str). If the document has a lot of content, help lists all parts of the document 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.

How to view the Python Help document in command-line mode---dir, assist, __doc__

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.