In the process of learning and practicing Python, I often fail to remember all the methods in some modules, or forget to use them correctly, or report an error when coding
At this time, I will think of tutoring on a relevant knowledge point, in addition to Baidu-related key points Apart from words, one way should be to check the DOC document.
But the local DOC documents are all standard libraries. If you encounter some knowledge and standard postures of third-party libraries, where can you check them?
Call the
help
function to see the string document of a function or method.Use
dir
to view which methods a module or object has.Use
ipython+?
to viewUse pydoc to view string documentation
Many third-party libraries have their own official websites, such as requests library, jinja2 library, etc. So if the library you want to use happens to have their official website, you can go and learn by searching their official website, but if you are unlucky No, you can only learn from other people’s blogs or sharing. If you have a certain level of basics, you can directly look at the source code of their modules and find what you need from them