I. Introduction to the environment

Programming IDE: VS Code

Operating environment: Windows, Ubuntu

Python version: 3.8.0

Full PDF download address (continuously updated resource package) : download.csdn.net/download/xi…

Introduction to Python3

Python is a cross-platform computer programming language. It is an interpreted, object-oriented, and dynamic high-level programming language. It is used in many fields, including Web programming, scripting, scientific computing, and artificial intelligence.

Python was originally designed for writing automated scripts (shells), but as versions continue to be updated and new features are added to the language, it is increasingly being used for the development of independent, large projects.

There is no superior or inferior language, each has its own value, each programming language has its own advantages; C language can be used to write operating system is close to the hardware language, so, C language is suitable for the development of those who pursue speed, give full play to the hardware performance of the program. Python is a high-level programming language for writing applications.

2.1 Content Introduction

Python3 Is a guide to Python3 that covers the basics of Python, including language introduction, environment setup, program operation, basic syntax, and variables….. I have written a total of 10 chapters, which will be continuously updated (directly update the PDF in the resource pack). The screenshot is clear, the code is detailed, and all have coloring, which is convenient to read and run the test directly.

2.2 Directory Introduction

Here are the details in the PDF:

Python3 Starter Guide… 1

Introduction to the Python programming language 1

1.1 What is Python? . 1

1.2 Python compared to other programming languages… 1

Build a Python development environment… 2

2.1 Introduction to Python versions… 2

2.2 Installing the Python Environment on a Windows VM… 2

2.3 Installing Python in the Ubuntu18.04 Environment… 5

2.4 Running Python Code… 8

2.4 Writing Recommended Python editors… 9

2.5 Installing the VSCode Code Editor on Windows… 11

2.6 Installing the VSCode Code Editor in Ubuntu… 22

Python basic syntax learning… 30

3.1 Writing your first Python program… 30

3.2 Single-line and multi-line comment syntax in Python… 31

3.3 Basic syntax of the Python output function :print() 32

3.4 Basic syntax for Python input functions: Input () 34

3.5 Python Identifiers and Keywords… 34

3.6 Indentation Rules for Python Code… 35

3.7 Text Coding… 36

Python variables, data types… 38

4.1 Introduction to Python Data Types… 38

4.2 Concepts and Assignment methods of variables… 38

4.3 Python Numeric Data Types… 41

4.4 Python String Types… 42

4.5 Python String Processing… 44

4.6 Python List Data Types… 48

4.7 Python Tuple Data Types… 56

4.8 Python Dictionary Data Types… 58

4.9 Python Set Data Types… 66

Python operators… 73

5.1 Operation Description… 73

5.2 Arithmetic Operators… 74

5.3 Comparison Operators… 75

5.4 Assignment Operators… 77

5.5 bit operators… 79

5.6 Logical Operators… 81

5.7 Member Operators… 82

5.8 Identity Operators… 84

5.9 Operator Priority… 86

… class = ‘class6’ >… 87

6.1 If Statement… 87

6.2 While Loop Statements… 89

6.3 For Loop Statements… 92

6.4 Break Loop Control Statements… 98

6.5 Continue Loop Control Statements… 99

6.6 Assert Statements… 100

Python functions… 100

7.1 Calling a Function… 101

7.2 Defining a Function… 102

7.3 Passing Function Parameters… 103

7.4 Anonymous Functions… 106

7.5 Return Statement… 107

7.6 About modifiable and immutable function parameters… 108

7.7 Local Variables and Global Variables… 109

7.8 Local Functions… 111

Python module… 111

8.1 What are modules in Python? 112.

8.2 Importing modules: Learn import statements… 112

8.3 Writing a Custom Module… 115

8.4 Module Search Path…… 117

8.5 Python Packages… 123

8.6 Downloading Python Third-party Libraries (Modules)… 128

File IO programming… 130

9.1 Introduction to Python File Manipulation Functions… 130

9.2 General File Operation Sequence…… 130

9.3 Python’s built-in Open function… 131

9.4 Common Methods for Operating Files… 133

9.5 Invoking interface Functions provided by the Operating System to Operate Files… 140

9.6 Common Functions of the OS. path Module… 144

9.7 Fnmatch module: Used to match file names… 145

Tempfile module: Generate temporary files and temporary directories… 146

Object-oriented programming… 147

10.1 Object-oriented programming ideas… 147

10.2 Object-oriented Terms… 148

10.3 Basic Use of Classes and Objects… 148

10.4 Class Encapsulation Mechanism… 156

10.5 Class Inheritance Mechanism… 157

10.6 Overriding the Superclass Method… 159

2.3 Content Details