Original: Talk about Python small white how to system self-learning to become a Python Daniel (basic article) on
Support original
This article, by the headline Py Cauchy published, prohibited reprint, I hope you support the original
You are welcome to click the Copy link to see the original https://www.toutiao.com/i6545819194888290820/
This original in addition to this chapter, the follow-up will also be derived from the following advanced learning methods
General Chapter
I. Study PREFACE
Two. Environment construction
Three. Basic concepts of Python
I. Study PREFACE
Many people in the self-learning Python, always do not know how to learn, do not know how to learn, see the framework today, want to learn flask or other framework, but when the study of the lost, do not know how to learn, want to learn python, but do not know the direction and prospects of Python employment, Small series to everyone strongly recommend a Python learning method, as long as follow this method to learn, then, in the same time with others learning, under the same conditions, you will learn the efficiency of the higher than others.
Python is a lot simpler than any other language, but it also puzzles a lot of other industry Daniel, why?
Because of Python, many modules are not automatically installed by the software, but by themselves manually installed, although the problem of manual installation, but save the memory space of the computer, and want to use the installation, do not install this advantage, and other languages do not have this feature, This is one of the reasons why other industries are trapped. Other languages, there is not much demand in the language format, like vs after you write a program, it will automatically help you to align the format, but Python is not the same, when you do not align the format, will show an error, know people will change the format of the code, People who don't know are looking for mistakes in the code. The two reasons mentioned above are the main reasons why most people make mistakes, and of course, there are other reasons why the small part is not in the one by one for everyone to explain.
Two. Environment construction
After the download of Python, many people are not used in the use of, because not download Python is not downloaded, but in the time of downloading Python to tick the Add to Path option, then, want to use Python, do not need to download and re-download it??? The answer is no, you can right-click My Computer-"attribute-" Environment variable-"system variable-" Path inside to configure environment variables, it is not difficult, of course, there are virtual machines, Linux, SSH ', small series will be published in the following articles, like can subscribe to Oh, can be the first time to read articles, or add group 491308659, add group code: Cauchy, Small series will give in advance update, want to see can add group, there are more learning materials in the inside. When the environment is set up, then you can use Python to write programs. Here's a small series to ask you a question, what is Python?? A lot of people will certainly answer, develop the software IDE, then, the present part asks again what is IDE?? IDE is an integrated development environment, as to why it is called integrated development environment, small series is not here for everyone to answer.
Three. Basic concepts of Python
The basic concepts of Python are divided into four chunks:
对象与名字内置对象关键字标准的输入与输出
A lot of people look at these times, they will be a blank face, why? Small series in the first time to see these times also produced a question, what is the object and name, what is the built-in object, what is the keyword, what is the standard input and output??
Very simple, let the small series to answer
1. What is object and name
1). Object
"Everything is Objects" (Everything is Object), which is the idea advocated by the object-oriented language of Python. In our familiar C + +, 1 is only an integer, not an object. But in Python, 1 is a real object, and you can use DIR (1) to display its properties.
In Python, all objects have the following three characteristics:
Once an object is created, its identifier is not allowed to change. An object's identifier can be obtained with an intrinsic function ID (), which is an integer number. You can think of it as the address of the object in memory, in fact, in the current implementation of the identity code is the memory address of the object.
2). Name
A name is a salutation to an object, an object can have only one name, or it can have no name or multiple names. But the object itself does not know how many names, what is called, only the name itself knows what it is pointing to what the object. The operation of giving the object a name is called naming, and Python considers the assignment statement to be a named operation (or name binding). This article, published by the headline Py Cauchy, banned reprint, I hope you support the original.
The name is valid within a certain namespace and is unique, and it is not possible to have two or more objects within the same namespace with the same name.
Let's take a look at the first example of this article: i = 1. In Python, it has the following two meanings:
2. Built-in objects
This explanation is relatively troublesome, give us a brief explanation: the built-in objects are divided into three dictionaries, ganso, and lists, the differences between the three are relatively troublesome to explain, we can add group 491308659, to understand, but also in advance to obtain the latest on the Python system learning articles.
3. Keywords
Keywords are pre-reserved identifiers, and each keyword has a special meaning. Programming languages are numerous, but each language has a corresponding keyword, Python is no exception, it comes with a
Keyword
Module for detecting keywords.
4. Standard input and output
Let's give a simple example:
Input ("Please enter name")
You need to enter the name manually, but it does not output
If you want to see the input name you need to
Print (Input ("Please enter name"))
This way, the input and output are solved.
Four. Basic data types
The basic data types are divided into two main categories:
序列散列
And the sequence is divided into three parts: string, List, Ganso
The hash is divided into two parts: a collection, a dictionary
Like this part does not need to do too much to explain to the past more of this series of articles, you can focus on this headline number, or add group 491308659, add group code: Cauchy, ... This article, by the headline Py Cauchy published, prohibit reprint, I hope that we support the original, original is not easy, I hope you subscribe, small series will bring you more exciting follow-up articles, I hope you subscribe
Original: Talk about Python small white how to system self-learning to become a Python Daniel (basic article) on
Original: Talk about Python small white how to system self-learning to become a Python Daniel (basic article) on