How to start learning Python?

Source: Internet
Author: User
What software should I install on my computer? What preparations are required? The job is waiting. What software should I install on my computer? What preparations are required? The job is waiting. Reply content:

PythonIt is a general programming language and soon becomes a necessity for every self-respecting programmer.

Python has countless Web frameworks. From basic minor architectures to complete architectures, they have their own advantages. So you are going to use it for some web development, but before exploring the details, let's start from scratch.


Learning the basics of Python

Up to now, Python has two versions. 2.7.5 and 3.3 are currently stable Python versions. It doesn't matter which learning you choose, because the difference is very small-especially for beginners. But you should know that although Python 2 has a lot of third-party support, Python 3 is the focus of design language developers, and many third-party support has not been transplanted to Python 3. You need to make a decision on this option. However, learning any new language is a daunting task. Finding the right place and people and learning from it is half the success. This is the use of this Guide. Making Python simple, interesting, and easy to learn is your blueprint.


1. Codecademy python Course

Codecademy has done a great job by combining python courses, which is very useful for beginners to get started with Python.

2. ScreenCasts

For beginners, there are some great screenshots.

Some screenshots that I refer to when learning python are:

  • ShowMeDo's Python Screencasts
  • TheNewBoston's Python Programming Tutorials

The two tutorials are excellent. You can even write scripts after learning these two series. We recommend that you watch the tutorials for free and a great resource for your future reference.


3. Official Python website

Of course, no more than official http://python.orgDocumentation is a better resource. But it is not recommended for beginners, because the concepts involved are more in-depth and advanced, but it is still the best resource.

With this, you will have some python knowledge and know how to process things in python.

Read some books

There are excess free high-quality e-books to choose from. The following quick list lists some of the best books. You can download their electronic versions for free, or if you want to support authors, you can also choose to purchase paper books (or donate). I believe they will be very grateful for this method.


Think Python: How to Think Like a Computer Scientist

Think Python involves a little more theoretical knowledge. This may be frustrating for beginners, but this book's knowledge about algorithm principles and advanced concepts is worth reading.

Invent With Python

If "Learning and doing" is your way, building your own game will be a very worthwhile experience! In this book, AI Sweigart assumes that you do not have the knowledge of Python and lead you to build your own games.


Familiar with StackOverFlow

StackOverFlow is not just a "Newbie" error and problem. Some very intelligent and helpful people are also using this website-Learn from them!

For example, let's take a look at the hidden features of Python. This problem.

Many tips and tips you can see here may not be involved in many formal tutorials, but they are very useful for intermediate and advanced Python users.


Go to Web Development

Now that you have completed the Python ninja training and are preparing to go deep into Ptyhon Web development, the problem is that there are a lot of frameworks and it is very difficult to select the best framework. But from the perspective of beginners, flaskThe basic Web framework is very suitable for getting started with Web development, because you only need to know Python, And you have learned a lot.

After learning the Flask framework, you will know that it is very simple to create a static page. This is the next problem. Is it suitable to use it to create the next large application of web2.0? The answer is:YesYou can use Flask to create any application you want, but after many steps, you will find that you have successfully rebuilt an existing wheel, but it gives you great flexibility and strength. At first you may feel unstoppable, and this is also the choice of many beginners.DjangoAnd then changed the other frameworks in about six months.


You can read this and find out which websites are driven by Flask.

The largest site built with Flask

Although Django and Pyramid are also good at Web development, they are designed for advanced users, rather than just learning to write a few lines of python for beginners. But if you want to study Web development seriously, learning Flask is a good getting-started framework, because it does not abstract anything, nor has any magic.


Common libraries and tools

PyPy

If the job you want to do is computation-intensive, you will find that Python performance is a bottleneck. In this case, you need PyPy. PyPy is a substitute for the Python interpreter, which can effectively speed up processing.

NumPy + SciPy

These two libraries are usually used together (SciPy depends on NumPy ). If you need to do some complex numerical computing or scientific research work, these two libraries will be your friends. NumPy and SciPy extend Python's mathematical functions to greatly improve your work efficiency.


BeautifulSoup

As its name suggests, BeautifulSoup is indeed very elegant. If you need to parse an HTML page to obtain some information, you should know that this is very annoying. BeautifulSoup is used to do these tasks for you and save time. It is strongly recommended.

Python Image Library

The Python Image Library (PIL) is an extension Library used to process almost all Image operations. If you need to process an image, PIL can do a lot for you.

After learning about this, you can embark on your own Python path.


Some Web development libraries

SQLAlchemy

SQLAlchemy is a Python tool set for SQL and object ing (ORM. It is powerful and flexible, allowing application developers to conveniently perform SQL operations.

Alembic

Alembic is a lightweight database integration tool mainly used with SQLAlchemyCollaborative use.


Http://www.oschina.net/translate/get-started-python-web-development.

I recently opened a public account and now I am talking about python every day, but I am not very familiar with it.
You are welcome to listen.

The programming classroom named Crossin
Crossincode
Send a QR code Portal
I am a beginner, and I have a lot of knowledge. If there are any mistakes in the article, whether it's a text mistake or an understanding mistake, please leave a message to inform me, I must be grateful!

** The series of articles under the Python classification are constantly updated. If you can't wait to see how to write them, try this [Python Algorithms-C4 Induction and Recursion and ction] (Python Algorithms ) If you feel like you have been leaving a message for a long time, if you do not think it is good, simply turn off this blog website. Hey **

** [Thanks to @ Google fans for naming this series. I like it very much. It is called "The Story of codoon and snake"] **

1. Python Basics

[Python Basics] (Python Basics ) And [Python Advances] (Python Advances )

The former is a simple summary of the Python BASICS (most of them are taken from [Python tutorial by instructor Liao Xuefeng on the Internet] (Python tutorial-liao Xuefeng's official website) ), The latter recommends some good articles on advanced Python features (most of them are from [bole online Python classification] (Python-blog ))

2. Python Data Structure

For more information about Data Structures, see [Problem Solving with Python] (Welcome to Problem Solving with Algorithms and Data Structures ) [The link to this website may be slow]. Of course, it also integrates some [Introduction to Algorithms] (Introduction to Algorithms In addition, there are a lot of content on wikipedia, so there is a lot of content, it may be a bit messy. This section mainly introduces how to use Python to implement common data structures, such as stacks, queues, binary trees, and so on. It also provides Python's built-in data structure performance analysis, it also includes a brief summary of search and sorting (which will be described in more detail in the algorithm design article. Every article has implementation code with a lot of content. Simple algorithms generally give a general introduction to ideas and algorithm flows. complex algorithms provide various diagrams and code implementation details.

** This part is the first part of the algorithm design Article below. If the data structure is good, you can directly read the algorithm design article. If you have any problems, you can come back and check a specific content in the Data Structure Article to charge it, I personally think it is better to directly read the algorithm design article, because everyone's time is precious. If you will read these articles, it means you must have a certain foundation, the later part of the article on algorithm design is more about ideas. Here we are more about code. **

(1) [Search] (Python Data Structures )

Briefly describe sequential search and binary search, and describe Hash search (Design of hash function and how to avoid conflicts)

(2) [sort] (Python Data Structures )

Briefly describe the ideas of various sorting algorithms and their illustration and implementation

(3) [Data structure] (Python Data Structures )

Briefly describe the Performance Analysis and Implementation of Python's built-in data structure common data structures: Stack, queue, and binary heap

(4) [tree Summary] (Python Data Structures )

Describe Binary Tree, and describe the thoughts and implementations of Binary Search Tree and AVL Tree.

3. Python Algorithm Design



Algorithm Design: [Python Algorithms: Mastering Basic Algorithms in the Python Language] (Python Algorithms: Mastering Basic Algorithms in the Python Language ) [** Click the link to go to Springer to download an electronic version of the original book for free **] and then write a reading summary. Most of the content of the original book is combined with the classic book [Introduction to Algorithms] (Introduction to Algorithms ), The content is more detailed, mainly introduces a variety of common algorithm design ideas, and how to use Python to efficiently and skillfully implement these algorithms. Here is different from the previous data structure article, some algorithms, such as sorting, do not detail their implementation details, but focus on their internal algorithm ideas. This part uses some third-party modules related to the data structure. Because this article focuses on the idea and implementation of algorithms, it does not re-implement each data structure, however, when introducing algorithms, we will analyze the advantages and disadvantages of Python's built-in data structure and third-party data structure modules, which means this article is much more difficult than above, however, I think my introduction should be simple and clear, because I use simple languages and do not list a bunch of properties and theorems like introduction to algorithms, I think about a problem step by step and the algorithm will come out. Hey hey, there are a lot of things about python development in addition to this. You can't miss it!

Every article here has implementation code, but I usually don't analyze the code. It is more about analyzing algorithm ideas, so there are more content, even so, it does not include all the content in the corresponding chapter of the original book. Because the content is too rich, I just choose a classic algorithm instance to introduce the core idea of the algorithm. In addition, there is still a lot of content that is not available in the original book, partly from the introduction to algorithms, and partly from my own insights. This article is a small dish for the great gods. Please smile, it may be a bit difficult for cainiao, so the most suitable one is similar to mine, I have some knowledge of various algorithms, but I still don't have a deep understanding of the half-bucket program. Hey hey.

The sequence of this article is as follows: [Python Algorithms: Mastering Basic Algorithms in the Python Language] (Python Algorithms: Mastering Basic Algorithms in the Python Language ), To save time and maintain the original flavor, part of the content (generally difficult to translate and understand) directly extract from the original English content.

** 1. you may think that you know a lot about the content, but it is not necessary to read it. In fact, if it is me, I will also think so. But if it is just to sum up the steps of an algorithm, this summary is meaningless. I think the highlight of this summary is to find a way to clarify how an algorithm is created, what needs attention, and how to optimize it, the Q & A method is used to allow readers and me to come up with a solution to a specific problem. Each article will have one or two questions to answer later **

** 2. you may also say that the introduction to algorithms is not both authoritative and comprehensive. Basically, every algorithm has a detailed proof. Isn't it better to read the introduction to algorithms? Of course, if you want to read the introduction to algorithms, I will not stop you. After reading the introduction, I feel like you are not good at all. Don't blame your younger brother for not reminding you, the right theorem of the left nature is not suitable for algorithm science, and few people can stick to it. But there are not many stories about codoon and snakes **

** 3. If you carefully read this series, I promise you will have a lot of GAINS. I will give you a prompt when you need to look at the part of the introduction to algorithms. Note: the first three sections are about the basic knowledge, so the wonderful content starts from section 4th, and the wonderful content is from ~ **

(1) [Python Algorithms-C1 Introduction] (Python Algorithms )

This section briefly introduces the content in the original book, describes the importance of algorithms and the summary of each chapter.

(2) [Python Algorithms-C2 The basics] (Python Algorithms )

** This section describes three methods: Representation of the algorithm's approximate running time, six algorithm performance evaluations, and implementation of the tree and graph in Python. **

(3) [Python Algorithms-C3 Counting 101] (Python Algorithms )

The original book mainly introduces some basic mathematics, such as arrangement and combination and recursive loops. However, this section only focuses on three methods for calculating the algorithm running time.

(4) [Python Algorithms-C4 Induction and Recursion and ction] (Python Algorithms )

** This section describes three core knowledge of Algorithm Design: Induction, Recursion, and Reduction. This is the focus and difficulty of the original book **

(5) [Python Algorithms-C5 Traversal] (Python Algorithms )

** This section describes the graph Traversal Algorithms BFS and DFS, as well as the Topology Sorting method and the (strong) graph-searching algorithm **

(6) [Python Algorithms-C6 Divide and Combine and Conquer] (Python Algorithms )

** This section mainly introduces the divide and conquer policy, and mentions the balance of the tree problem and the Sorting Algorithm Based on the divide and conquer policy **

(7) [Python Algorithms-C7 Greedy] (Python Algorithms )

** This section describes the greedy policy through several examples, including the knapsack problem, the Harman encoding, and the minimal spanning tree **

(8) [Python Algorithms-C8 Dynamic Programming] (Python Algorithms )

** This section describes the implementation methods of the Memorandum and iterative method of dynamic planning based on some typical dynamic planning issues, and compares the two methods **

(9) [Python Algorithms-C9 Graphs] (Python Algorithms )

** This section mainly introduces various Shortest Path Algorithms in graph algorithms, and reveals their kernels and similarities and differences from different perspectives. ** we recommend that you learn Python in a stupid way (the third edition).
I have been learning programming recently. Pure interest. 2 sites are recommended
Class: http://www.learnpython.org
Advanced Class: http://learnpythonthehardway.org/book/ Coursera has a Python interactive programming class. Haha, I know I will be back.
First, you only need the next ide. Then, let's take a look at "python concise tutorial". This book is very small, and the basic knowledge points are basically covered, you can repeat all the content in it in 2 or 3 days (it can be done without much time ).
Then, you can start to make some small things. For example, when playing games, you may often encounter tables to be exported, that is, exporting data from excel to txt or other places, for example, do some batch processing operations, and try to capture images and information of a website. If you think the one above is not interesting and you like to play games, you will know that there are often repeated operations in the game, such as upgrading and making copies, you can write something like a key-pushing genie (remember not to do the interface ), in short, you just need to find something interesting to do. Of course, these processes will certainly encounter problems (of course, I promise they won't involve complicated issues). You try to search and solve them.
Finally, when you solve this problem, you will find that python is so interesting (streamlined code can practice so many functions ......), At this time, you can continue to make gadgets and gadgets, or go back and find more systematic books (such as python core programming. After that, the rest of the advanced courses will be handed over to time with great experience. I think some of the content in another question is applicable and I will post it. Let's share some of my summary:
Pycharm, a free Python IDE is recommended
IDE comparison, open source is the final principle

Learning link:

Python:

Python | Codecademy

PythonTab: Python Chinese developer community portal

R:

R language Chinese network-R language Forum


Last share:
Be as persistent as a hacker
Of course there are some things of python's Ta-lib, which won't be written here. If you are interested, you can exchange and learn from each other. Recommend a website, you can use http://www.mengma.com when learning
After getting started, you can read some books and think back to your Python learning experience.
My experience is that you can start with the Web, learn about Django, webpy, and other frameworks, and make some small or similar web applications. When you encounter problems, go back to the Internet to find some third-party libraries or other materials. This will naturally improve.
In the process, you may encounter various problems. google is your best assistant (Alas, no one is learning Python and you can only rely on yourself ). There is a problem. You should note that when you reach a new level, you will feel that you need to learn so many things, and then want to learn both this and that, the results will be hard to learn. Identify a target, first make a score, and then do something else.
It's just a personal opinion, and learning depends on yourself.

This problem is simple and complex.

First, we need to learn a sentence of interest. when you get started, interest is the only motivation that drives your continued learning, because program design is mental labor, the crystallization of wisdom, and every program you write is painstaking.

Second, we must have strong perseverance. because programming is purely mental labor, there will be a lot of problems on your learning path. You should know that a symbol cannot be wrong. If it is wrong, it will fail the program, and the result will be wrong. it may take a long time for you to solve a small problem. QQ group \ QUERY information (Baidu and Google can solve most of the problems) \ view the help of the software (language) and so on

Third, there are goals, such as making a chat software or something, and then designing, querying materials, coding, testing, etc. It is the fastest way to learn by actually interested things. it is very difficult to make it timely, and it is necessary to step by step. you can build up experience as a small object in the first place.

The help documentation for python is good in English. If you want to learn programming, you must use Kingsoft as a fashion.

Good luck, long programming path, persistence is victory
Python Training The landlord can take a look at this, hoping to help you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.