It took me some time to finally set up the Python environment, and it took me a lot of time to choose the Python development tool

More time. For Python, the author is just a beginner. For developing Python tools, the author chooses Eclipse+

How the PyDev plug-in is developed.

Here I still want to introduce the Xiaobian learning exchange group, what do not understand the problem, can actively speak in the group, what information you need at any time L contact Mengya to get the information you want. This Python benefit is: mengy7762 Xiaopian look forward to everyone exchange and discussion, to tell the truth is a very suitable place to learn. All kinds of introductory data ah, advanced data ah, framework data ah crawler and so on, are some, in the wind and rain, Xiaobian are waiting for you in the dream of friends

Books to choose

There are a wide variety of books available for every programming language, and it’s important to choose one that fits your reading style.

I think that for a beginner to learn a programming language, suitable for their own books, do not necessarily need to choose industry recognition

For the best. In line with their own reading habits, to be able to raise their own interest for beginners may be more important!

Based on my reading habits and learning habits, I chose the book “Python Core Programming Second Edition”. I’m reading a book

During the process, I like to check online resources interspersed with them, which enables me to have a deeper understanding of knowledge



Another small habit I have in programming is to learn a new language before learning it

How it is annotated, and what the simple annotation specification is. In my opinion, we need to use annotations for beginners

It is a good habit that we memorize and annotate diligently.

Here I also give a brief summary of Python’s annotation approach and its annotation specification.

Single-line comments

Unlike Java, a single-line comment in Python starts with a # and some space, followed by the comment content. Such as:


Print statements


Print statements


2. Inline comments

Inline comments are a common technique in Python, but when you use them, you need to be careful about the distance between the comment and the statement

Ask questions with at least two blanks.


Test =”hello” # Declare and initialize the variable

Test =”hello” # Declare and initialize the variable

3. Multi-line comments

Python itself does not have multi-line comments, so we can only use # single-line single-line comments, but we can use it

”’ ”’ includes comment blocks to achieve the effect of multi-line comments. “” is used to document functions.

4. Chinese notes

Note that Python generally ignores the contents of the # line and skips the rest of the # execution. Exceptions are made for comments with special meaning

These special-meaning comments perform some special-purpose function, for example


Coding =GBK # supports the use of Chinese annotation

Coding =GBK # supports the use of Chinese annotation

Python Getting Started

After a while, here’s a summary of some of the highlights of Chapter 1 of “Python Core Programming.”

1. Memory management

Pyhton does not require a Coder for memory management (recycling), similar to Java. For memory management, is intersection

I’m responsible for the Python interpreter. It is designed to free the Coder from memory and focus on the direct object

Standard, reduce program errors.

Here’s a little digression, just for personal reasons: some people have a hard time with Python’s built-in management and Java’s garbage collection mechanism

There is always the idea that garbage collection affects program performance. The author also does not do too much elaboration to this.

It is unreasonable to use “performance” to influence design, performance and design can only be balanced

2. Interpretation and (byte) compilation

Python is an interpreted language, and we don’t compile it in real development. Interpreted languages run one

Slower than the compiled type. Python source files are loaded by the interpreter and compiled into bytecode (an intermediate language,

Class machine language).

3. Run Python

It works in three different ways

Start the interpreter interactively

The so-called interactive launch interpreter is to call the interpreter every time you write a line of code

Execute the statement once. Good for quick practice. Win+ R-> cmd-> python

Script way

Needless to say, like shell scripts, the execution code is in the source file,

The interpreter executes once. Run files with suffix directly.

4. Summary at the end of chapter

1. Standard template library

Python provides a number of standard template libraries, as well as some APIs provided by the JDK

Again, with the standard template library, we can achieve the goal faster and better.

Just like building blocks, we don’t have to build blocks ourselves, we care

It’s just building blocks into models that we care about.

Practice: Learn (read it briefly, but analyze it later)

2. Interactive exercises

CMD -> Python: print(“HELLO”)

3. Script practice


Input ()# Prevent program flash (Python3)