When studying a new language, the most important thing to know is how to use "help". You can find out the following by running the help of Python's shell terminal.
--How to use the help tool --You can start the help tool by typing "help ()" after the Python terminal prompt ">>>". The point of interest is "how to use" in the fourth paragraph. -Check [x] keywords : small_blue_diamond: You can see the list of keywords by typing "keywords" after the Python terminal prompt "help>" and running it. Specific keywords For example, if you want to check the help content of "class", just enter "class" and execute it, the help content will be compressed and fit in one line. It can be expanded by double-clicking. -Examine [x] symbols : small_blue_diamond: You can see the list of symbols by typing "symbols" after the Python terminal prompt "help>". Specific symbols For example, if you want to check the help contents of "+", just enter "+" and execute, the help contents will be compressed and fit in one line. It can be expanded by double-clicking. -[x] You can also check "modules" and "topics" in almost the same way.
But the output of help is text on python shell windows, so it's hard to read when the body is long. In this case, you can output to html format using "pydoc".
--How to use pydoc tool --Enter "pydoc * random *" after the prompt "$" after starting the MacOS terminal and execute it to generate the document of the random module of the Python standard library. The results are displayed in the Mac OS terminal. An easier way to read is to run "pydoc -w random" and it will output "random.html" to the current directory.
Recommended Posts