Python study note_002

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. help()実行後のイメージ -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. keywordsの一覧 -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. symbolsの一覧 -[x] You can also check "modules" and "topics" in almost the same way. 「modules」と「topics」の一覧

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. pydoc randomの出力結果 pydoc randomの出力結果

Recommended Posts

Python study note_002
Python study note_004
Python study note_003
Note: Python
Python note
[WIP] Fluent Python Study Note
Note: Python Decorator
Python programming note
[Python] Learning Note 1
Python study notes _000
Python study notes_006
Python study notes _005
Jupyter Study Note_002
[Note] openCV + python
Python beginner's note
Python study notes_001
Jupyter Study Note_003
Jupyter Study Note_007
Jupyter Study Note_005
Python study day 1
[Note] future sentence ~ Python ~
[Note] File reading ~ Python ~
Note to daemonize python
Note: python Skeleton Nya
Python basic grammar note (4)
Python basic grammar note (3)
Python Tkinter Primer Note
Note
Python
Study Python with Google Colaboratory
Study from Python Hour4: Object-oriented ②
Python Input Note in AtCoder
[Note] Operate MongoDB with Python
Study from Python Hour3: Functions
Note
Note
python pandas study recent summary
3 months note for starting Python
Study from Python Hour4: Object-oriented ①
[AtCoder] ABC165C Personal Note [Python]
Note that it supports Python 3
A note about [python] __debug__
Python Note: About comparison using is
[Note] Project Euler in Python (Problem 1-22)
Python: A Note About Classes 1 "Abstract"
selenium case study summary python pyCharm
(Note) Be careful with python argparse
Study from Python Hour2: Control statements
Study on Tokyo Rent Using Python (3-2)
[Note] Hello world output with python
boto3 (AWS SDK for Python) Note
Foreign Key in Python SQLite [Note]
Study on Tokyo Rent Using Python (3-3)
Study, number guessing game in Python
Study Note 9_Install Jenkins on CentOS7
Python Note: Get the current month
A note about mock (Python mock library)
Basic study of OpenCV with Python
Python & Machine Learning Study Memo: Environment Preparation
Django note 4
Python basics ⑤