It took me some time to finally build the Python environment, and it took me some time to choose a Python development tool

More time. I am just a beginner in Python, and I choose Eclipse+ to develop Python tools

The way the PyDev plugin is developed.

Here I still want to introduce the small series of learning exchange group, what do not understand the problem, you can actively speak in the group, what information you need at any time L contact Mengya to obtain the information you want. Mengy7762 iS a very good place to learn python. All kinds of introductory information ah, advanced information ah, frame information ah crawler and so on, there are, in the wind and rain, xiaobian are waiting for you in the dream ya friends

Books to choose

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

I think for a novice to learn a programming language, suitable for their own books, do not 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 2nd Edition”. The writer is reading a book

In the process of reading, I like to check the resources on the Internet, which can give me a deeper understanding of knowledge and

Summary.

annotation

One of my favorite ways to learn programming is to read up on a new language before learning it

How it is annotated, and what the simple annotation specification is. I think we need to use comments for beginners

We remember, and it’s a good habit to annotate.

Here I also make a brief summary of the way Python is annotated and its annotation specification.

1. Single-line comments

Unlike Java, single-line comments in Python start with # good followed by several Spaces, followed by comment content. Such as:

[python]

Print statements

print(“hello”)

Print statements

print(“hello”)

2. Inline comments

Inline comments are a very common technique in Python. In practice, you need to be careful about the distance between comments and statements

Questions, usually at least two Spaces.

[python]

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. We can only use # single-line comments, but we can

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

4. Chinese notes

Note that Python generally ignores the # line and skips the # line. Comments with special meaning are an exception

These special meaning comments perform some special functions, such as

[python]

Coding =GBK # Supports Chinese annotations

Coding =GBK # Supports Chinese annotations

Starting Python

This is a summary of the highlights of Chapter 1 of Python Core Programming.

1. Memory management

Pyhton does not need Coder for memory management (reclamation), similar to Java. For memory management, yes

Responsible for the Python interpreter. It was originally designed to free up the Coder from the memory and focus on the direct

Standard, reduce program errors.

Here’s a little digression, personal only: there are some people who are interested in Python’s internalizing management and Java’s garbage collection mechanism

There is always the idea that garbage collection affects program performance. I do not elaborate too much on this.

It is inherently irrational to influence design by “performance”, and performance and design are often only balanced

2. Interpretability and (byte) compilability

Python is an interpreted language, and compilation is not part of actual development. Interpreted language run one

Slower than compiled. Python source files are compiled into bytecode through interpreter loading, bytecode compilation (intermediate languages,

Machine-like language).

3. Run Python

Three different ways to run it

Start the interpreter interactively

An interactive startup interpreter is one that calls the interpreter for every line of code written

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

# script mode

Needless to say, similar to shell scripts, the executing code is in the source file,

The interpreter executes once. Run the.py file directly.

4. Summary at the end of chapter

1. Standard Template library

Python provides many standard template libraries, as well as some apis provided by the JDK

Again, with standard template libraries, we can accomplish our goals faster and better.

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

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

Practice: Learning string.py (read briefly, save for later analysis)

2. Interactive exercises

For example: print(“HELLO”)

3. Script exercises

print(“hello”);

Input ()# Prevent program flash (python3)