Part 1: Introduction and Basics of Python
1. What is python?
Python is a high-level scripting language that combines interpreted, compiled, interactive, and object-oriented scripts.
2. Features of python:
(1) Easy to learn and easy to use;
(2) High development efficiency, built-in many data types, and powerful standard library support;
(3) high-level languages;
(4) Portability, based on open source features
(5) Scalability, if you need a critical piece of code that runs very fast, or want to write some algorithms that you don’t want to open, you can use C or C++ to complete that part of the program, and then call it from your Python program.
(6) Embeddable, you can embed Python into a C/C++ program, allowing users of your program to gain "scripting" capabilities.
3. Installation of python:
Windows installation:
(1)下载安装包
- Right-click on "Computer" and then click on "Properties"
- Then click on "Advanced System Settings"
- Select "Path" under the "System Variables" window and double-click it;
- Then in the "Path" line, add the python installation path.
Linux installation
(1) Download the installation package (the system may come with python2.7 installed as needed)
Browser access https://www.python.org/downloads/source/
(2) Enter environment variables in bash linux:
export PATH="$PATH:/usr/local/bin/python"