Basic tutorial: www.runoob.com/python/pyth…

Web development

The game development

Word processing

The environment

Run the following command on the MAC terminal:

python
Copy the code

Viewing the Python version

The installation

Binary package:

www.python.org/downloads/r…

Download the source code package: www.python.org/downloads/s…

./configure & make & make install



export PATH="$PATH:/usr/local/bin/python" 
Copy the code

Execute script or command window input

python script.py python >>> print("hello phthon!" ) hello phthon!Copy the code

ide

PyCharm

identifier

  • All identifiers can contain English characters, digits, and underscores (_), but cannot start with a number

  • Case sensitive

The code block

  • Use curly braces {}

  • Use the same indentation

  • Multi-line statements with slash “\”

  • annotation

  • Three single quotes

  • Three double quotes