2. Using the Python Interpreter — Python 3.9.25 documentation

docs.python.org

Tin mới

1. Whetting Your Appetite

3. An Informal Introduction to Python

Python documentation for the current stable release

Python documentation for the current stable release

The Python interpreter is usually installed as /usr/local/bin/python3.9 on those machines where it is available; putting /usr/local/bin in your Unix shell’s search path makes it possible to start it by typing the command

Python Module Index

3.9.25 Documentation

The Python Tutorial

2.1. Invoking the Interpreter¶

The Python interpreter is usually installed as /usr/local/bin/python3.9 on those machines where it is available; putting /usr/local/bin in your Unix shell’s search path makes it possible to start it by typing the command

Interactive Input Editing and History Substitution

The Python interpreter is usually installed as /usr/local/bin/python3.9 on those machines where it is available; putting /usr/local/bin in your Unix shell’s search path makes it possible to start it by typing the command

2.1. Invoking the Interpreter¶

The Python interpreter is usually installed as /usr/local/bin/python3.9 on those machines where it is available; putting /usr/local/bin in your Unix shell’s search path makes it possible to start it by typing the command

2.1.2. Interactive Mode¶

When commands are read from a tty, the interpreter is said to be in interactive mode. In this mode it prompts for the next command with the primary prompt, usually three greater-than signs (>>>); for continuation lines i

2.1.2. Interactive Mode¶

When commands are read from a tty, the interpreter is said to be in interactive mode. In this mode it prompts for the next command with the primary prompt, usually three greater-than signs (>>>); for continuation lines i

codecs: Encode and decode data and streams.

To declare an encoding other than the default one, a special comment line should be added as the first line of the file. The syntax is as follows: