I have learned a lot from learning Python for some time, from knowing nothing to getting started. Now let’s talk about how to get started with Python.

** Note: ** There is no logic in this article. It is a personal review of my learning experience.


To be honest, this topic is much more convincing if someone who has worked in Python for many years has a unique understanding of both the project and the language. And I’m probably not in a good position to answer that question for the following reasons:

  • First of all, my learning cycle is very short,
  • Secondly, I did not have strong logical computing ability before learning Python.
  • Third, I didn’t know much about Python before I told the truth. I just decided to learn Python after reading Zhihu and blogs and feeling that crawlers were fun.

But on the other hand, I think I am qualified to answer this question for the following reasons:

As a beginner in Python programming (really a beginner), I understand the confusion and struggle of beginners like me who have no basic programming and have poor logic when they first learn Python (python is actually relatively easy). According to my learning cycle and its effect, my learning effect has been their own test;

I started learning Python right after I graduated from university, rather than being forced to do so under the pressure of the job market. Therefore, I learned it on demand without much utilitarianism and trying to achieve a fast pace. Therefore, it is very helpful for me to grasp the basic knowledge and learn the rhythm of learning. First of all, I would like to say that before planning to learn Python, it is important to ask yourself: What is your purpose in learning Python?

Is it to cope with workplace pressure, passive recharge? Or just a whim, see today’s big data or artificial intelligence development in full swing, can not help to gather a wave of excitement? Or it is pure just for interest, some ideas to achieve their own, such as from time to time to climb a girl map…. And so on.

Different goals mean different lengths of time, different effort, different learning paths, different learning modules and different results.

Make sure good target, according to the need to learn, otherwise you will first before entry into confusion and perplexity, because python in addition to the built-in packages, there are more than tens of thousands of package are available, and if it is making the personal development of custody on small package, may have tens of thousands of, snapping fingers the count, enough to learn the rest of my life. ### about the learning process: ##### Stage 1: Pythoy environment setup and configuration, data types and variables, operators and expressions, strings, lists and dictionaries, functions, Object-oriented programming and modules Python Object-oriented programming starts from scratch — from nothing to objects. This object is not the other object, we can learn object orientation from process orientation and object orientation.

  1. Process-oriented: Write code from top to bottom according to business logic. Object-oriented: Bind data and functions together and encapsulate them, which enables faster development of programs and reduces the need to rewrite repetitive code.

  2. Object-oriented (Object-oriented; Abbreviation: OO) so far there is no unified concept definition is: according to the systematic thinking way of people’s understanding of the objective world, using the concept of object (entity) to establish a model, simulation of the objective world analysis, design, software implementation method.

  3. Object-oriented programming is a design and programming method to solve software reuse. In this method, the similar operation logic and operation application data and state in software system are described in the form of class, and reused in software system in the form of object instance, so as to improve the efficiency of software development. Maybe these technical terms are inherently hard to understand, so let’s think about it in a more accessible way.

Process oriented: rely on your hands to follow the process to solve the problem. Object oriented: Find an object, let it help you to solve the problem, their ease. Both of them are a way to solve the problem, there is nothing wrong with them, but they always feel strange…

Object orientation is a design idea:

  • In line with people’s thinking habits
  • Turn the executor into the leader
  • Simplify functions and simplify complex things

** Object-oriented has three characteristics: ** encapsulation, inheritance, polymorphism

##### Stage 2: Regular expressions, network programming (TCP, UDP, FTP and HTTP), MySql database regular expressions, also known as normal representation, normal representation, regular expression, regular expression, regular representation is a concept of computer science. Regular expressions use a single string to describe and match a series of strings that match a syntactic rule. In many text editors, regular expressions are used to retrieve and replace text that matches a pattern. It is a powerful tool to deal with strings, it has its own special syntax structure, with it, the implementation of string retrieval, replacement, matching verification are no problem. Of course for crawlers, it’s very easy to extract the information we want from HTML.

Regular expressions are not unique to Python. They can be used in other programming languages, but Python’s Re library provides the entire implementation of regular expressions. Using the RE library, we can use regular expressions in Python. Network programming:

  • TCP- Transmission control protocol (TCP), which provides connection-oriented and reliable byte stream services.

  • Before the client and server exchange data, a TCP connection must be established between them before data can be transmitted.

  • In order to learn TCP, it is important to know that “three handshake, four goodbye”, the so-called three handshake is the connection that must be established before sending data. It is called the three handshake.

  • UDP- User datagram protocol is a connectionless and simple datagram – oriented transport layer protocol.

  • UDP does not provide reliability; it simply sends datagrams from applications to the IP layer, but there is no guarantee that they will reach their destination.

  • UDP does not need to establish a connection between the client and the server before transmitting data packets, and there is no timeout retransmission mechanism, so the transmission speed is very fast.

  • UDP is a connectionless protocol. Each datagram is an independent message, including a complete source address or destination address. It is transmitted to the destination in any possible path on the network.

  • The HTTP protocolIt is an application based on TCP protocol.

  • HTTP connection uses the “request-response” mode. Not only the TCP connection needs to be established during the request, but also the client needs to send a request to the server, which contains the request method, URI, protocol version and relevant MIME style message, so that the server can reply to the data. Contains the protocol version of the message, a success and failure code, and associated MIME styles.

  • At the end of the request, the connection is actively released. The process from establishing a connection to closing a connection is called one connection.

  • Because HTTP actively releases the connection at the end of each request, an HTTP connection is a “short connection” that requires continuous connection requests to the server to keep the client program online. The usual practice is that even though no data is needed, the client keeps sending a “stay connected” request to the server at regular intervals, and the server replies to the client after receiving the request, indicating that it knows the client is “online.” If the server cannot receive requests from the client for a long time, the client is considered offline. If the server cannot receive any reply from the server for a long time, the network is disconnected

  • FTP File Transfer Protocol (FTP)FTP is a protocol for two computers to transfer files on the TCP/IP network. FTP is one of the earliest protocols used on the TCP/IP network and the INTERNET. It belongs to the application layer of the network protocol group.

  • The FTP client can issue commands to the server to download files, upload files, and create or change directories on the server.

  • MySQL is a relational database management system developed by MySQL AB, a Swedish company. It is currently a product of Oracle. MySQL is one of the most popular Relational Database Management systems. In WEB applications, MySQL is the best RDBMS (Relational Database Management System) application software.

  • Database – MySQL

  • MySQL senior

  • MySQL interacts with Python

##### Stage 3: Web basics, HTML, CSS, JavaScript, JQuery, Bootstrap, Ajax- Data asynchronous interaction.

  • HTML 5&CSS quick start
  • JavaScript
  • Introduction to Javascript (js)
  • Javascript (2) – js into order
  • JQuery
  • Ajax- Asynchronous data interaction
  • The project of actual combat

After some theoretical foundation, it’s a lot of practice (so start with your project)!

Summary in practice, perfect and solid theory in practice (problems should always be found and solved in practice, theory that can’t solve practical problems is shit)

Someone better be able to tell you how bad your code is…

##### Stage 4: Django

  • Django Tutorial part 1 – Django views and urls
  • Django Tutorial ii – Django views with URL progression
  • Django Tutorial (3) – Django Forms
  • Django Tutorial (4) – Django templates and progression
  • Django models (databases) and common Django Query methods
  • Django Tutorial 5 – Upload and display
  • Django Tutorial # 6 – Build a simple blog system

### QUESTION: Does Python require a deep programming background? I have zero programming background. Is it not suitable for me to learn Python? Python is a scripting language. The syntax is simple and easy to learn. For beginners who have no basic knowledge of programming, the most important thing is to stay beginner and stick with it. How did you get into programming? A lot of people are from the entry to give up, although there is a talent factor, the lack of purpose is also a very key factor.

Personally think that the most effective way to learn a foreign language is continuing to knock knock (bs), after all, programming is a artisanship, hand cooked is the foundation of all things, don’t be afraid to make mistakes, there is a problem to solve the problem is we the fastest way to progress, to feel not to when programmers, learning to program is to solve the problem, your problem breaks down, Let it drive your learning process step by step and it won’t be that hard to learn.

You learn, two years later at least you are 25 years old programmer, cool not cool on the other hand, you don’t learn, you are only 25 years old. That’s all.

Finally, here’s a text I’ve seen on Zhihu that may be the real harbinger of Python’s future:

Around 2003 or 2004, I bought a Python book written by a Brazilian. He said he firmly chose Python because as a child he often dreamed that the world would be ruled by a boa constrictor. I felt sorry for him. I could have dreamed of such a horrible scene. But today, maybe he was just like Anderson, the programmer in the Matrix, who accidentally traveled into the future and peered into the truth of the world.

#### go a wave of recommendations:

  • Python + IDE + Classic Project (open source, free)
  • The Python guru to watch on Zhihu