首页 > 代码库 > Python查看帮助---help函数

Python查看帮助---help函数

查看所有的关键字:help("keywords")


查看所有的modules:help("modules")


单看所有的modules中包含指定字符串的modules: help("modules yourstr")


查看中常见的topics: help("topics")

 

>>> help("topics")Here is a list of available topics.  Enter any topic name to get more help.ASSERTION           DEBUGGING           LITERALS            SEQUENCEMETHODS2ASSIGNMENT          DELETION            LOOPING             SEQUENCESATTRIBUTEMETHODS    DICTIONARIES        MAPPINGMETHODS      SHIFTINGATTRIBUTES          DICTIONARYLITERALS  MAPPINGS            SLICINGSAUGMENTEDASSIGNMENT DYNAMICFEATURES     METHODS             SPECIALATTRIBUTESBACKQUOTES          ELLIPSIS            MODULES             SPECIALIDENTIFIERSBASICMETHODS        EXCEPTIONS          NAMESPACES          SPECIALMETHODSBINARY              EXECUTION           NONE                STRINGMETHODSBITWISE             EXPRESSIONS         NUMBERMETHODS       STRINGSBOOLEAN             FILES               NUMBERS             SUBSCRIPTSCALLABLEMETHODS     FLOAT               OBJECTS             TRACEBACKSCALLS               FORMATTING          OPERATORS           TRUTHVALUECLASSES             FRAMEOBJECTS        PACKAGES            TUPLELITERALSCODEOBJECTS         FRAMES              POWER               TUPLESCOERCIONS           FUNCTIONS           PRECEDENCE          TYPEOBJECTSCOMPARISON          IDENTIFIERS         PRINTING            TYPESCOMPLEX             IMPORTING           PRIVATENAMES        UNARYCONDITIONAL         INTEGER             RETURNING           UNICODECONTEXTMANAGERS     LISTLITERALS        SCOPING             CONVERSIONS         LISTS               SEQUENCEMETHODS1 

 

例如想要查看CALLS主题的帮助,则:help("CALLS")

 


查看标准库中的module:import os.path + help("os.path")
查看内置的类型:help("list")
查看类型的成员方法:help("str.find") 
查看内置函数:help("open")

 

Python查看帮助---help函数