Time for action – using the Python help system
Depending on your operating system, you can access the Python shell with special applications, usually a terminal of some sort.
- In such a terminal, type the following command to start a Python shell:
$ python - You will get a short message with the Python version and other information and the following prompt:
>>>Type the following in the prompt:
>>> help()Another message appears and the prompt changes as follows:
help> - If you type, for instance,
keywordsas the message says, you get a list of keywords. Thetopicscommand gives a list of topics. If you type any of the topic names (such as LISTS) in the prompt, you get additional information about the topic. Typingqquits the information screen. Pressing Ctrl + D together returns you to the normal Python prompt:>>>Pressing Ctrl + D together again ends the Python shell session.
What just happened?
We learned about the Python interactive shell and the Python help system.