My friend asked me how to quickly master python. I want to write a quick Python tutorial similar to the w3cschool style by adding a variety of standard libraries and expanding libraries, on the one hand, keep the words concise, and on the other hand, gradually make it possible for readers without background to start learning from the basics. In addition, I concentrate on a small concept in every article, hoping that people can read it quickly in their spare time.
Reminder
1. The tutorial will focus on the basics of Python and the syntax is based on Python 2.7 (I will remind Python
3. There are changes in X to help readers adapt to the situations in 3.x ). The test environment is Linux,
Modules outside the standard library will not be used. Some packages in the standard library are not applicable to Windows. IfProgramCannot run on your platform. Welcome to discuss.
2. I will focus on the backbone of Python so that readers can create concepts for python as quickly as possible.
3. Linux Command lines start with $, such as $ LS and $ Python
4. the python command line starts with >>>, for example, >>> print 'Hello world! '
5. The comment starts #.
Suggestions
1. Knock the commands in the tutorial into python to see the effect.
2. After reading the tutorial, you can perform some exercises.
========================================================== ========
Python basics 01 Hello world!
Python basics 02 Basic Data Types
Python basic 03 Sequence
Python basic 04 operations
Python basics 05 indent and selection
Python basics 06 Loop
Python basics 07 Functions
Basic concepts of Python 08 object-oriented
Python basics 09 further development of object-oriented
Let's look at Python basics 10.
Bytes ---------------------------------------------------------------------------------------------
Python advanced 01 dictionary
Python advanced 02 text file input and output
Python advanced 03 Module
Python advanced 04 function parameter transfer
Python advanced 05 Loop Design
Python advanced 06 loop object
Python advanced 07 function object
Python advanced 08 error handling
Python advanced 09 dynamic type
Bytes ---------------------------------------------------------------------------------------------
Python quick tutorial Summary
How Python supplements the 01 Sequence
Python supplement 02 Python tips
Python supplement 03 Python built-in function list
Python Supplement 04 a brief history of Python
Python supplemented 05 string formatting (% operator)
Add Python 06 to Python
========================================================== ========
With the support of everyone, we basically completed the serialization of the quick tutorial. I learned a lot from this process. After the foundation of Python, the python standard library naturally becomes the next challenge. The importance of the python standard library is:
1) it is part of Python.
2) the philosophy of python is that there is only one best solution to a problem. These standard libraries provide a standard solution for the problem.
3) many important Python projects, such as Django and numpy, also need to borrow standard libraries. Understanding the standard library is a prerequisite for continuing learning.
I hope you can learn from them.
The main difficulty of learning the python standard library is that it requires basic knowledge of the operating system. The Python standard library tutorials I have read all share a common problem.
Assume that you have an understanding of the operating system and network basics. Of course, it is good to have rich experience in the system, but if it is unfamiliar, it is very difficult to learn the python standard library. However, it takes a lot of effort and time to fully learn system knowledge. For this reason, I also added a Linux system-related post to discuss the basic concepts and systems of Linux. These concepts and systems can form a basic framework. After learning about these concepts, you can easily learn the python standard library. You can also choose to continue reading the standard library until you need to add this knowledge and read the system-relatedArticle. Linux concepts and Systems
Python standard library -- Taking a look
Preparation for learning the python standard library
Python standard library 01 regular expression (Re package)
Python standard library 02 time and date (time, datetime package)
Python standard library 03 path and file (OS. Path package, glob package)
Python standard library 04 File Management (Some OS packages and shutil packages)
Python standard library 05 storage objects (pickle package, cpickle package)
Python standard library 06 Sub-process (subprocess package)
Python standard library 07 signal (signal package)
Python standard library 08 multithreading and synchronization (threading package)
Python standard library 09 Process Information (Some OS packages)
Python standard library 10 multi-process preliminary (multiprocessing package)
Python standard library 11 multi-process exploration (multiprocessing package)
Python standard library 12 mathematics and random numbers (Math package, random package)
Python standard library 13 itertools)
========================================================== ========
Python has many applications in the network, whether it is to provide HTTP services (such as Douban) as the server side or to capture webpages as the client side. Python provides
Socket interface, you can directly program the socket. In addition, various advanced packages can implement different network functions. However, the biggest advantage of Python network applications lies in the advantages of Python integration, such as simple syntax, high readability, and powerful script functions, these enable Python developers to quickly develop excellent network products.
Only the network packages provided in the python standard library are allowed here.
Python network 01 original Python Server
Python network 02 Python server Evolution
========================================================== ========
Until now, if you have been following the python tutorial, I expect you can write some useful Python programs (or even large programs ). If you have achieved your goal, I think your python learning can come to an end. (Congratulations)
Of course, I will continue to add some previous content, such as some standard library packages, such as more Python network applications.
In the following section, I would like to discuss in depth the python system. Python has rich syntaxes, but these syntaxes are built on a very simple object model. In this section
It is not necessary to use python. However, if you are not satisfied with the positioning of a python user and are engaged in some Python development (such as making a python tool, such as writing a framework ), you will want to have a better understanding of this object model. In addition, I will explain some of the previous topics in this section.
Python goes deep into 01 special methods and multi-paradigm
Python in-depth 02 context Manager
Python goes deep into 03 Object Attributes
Python goes deep into 04 closures
Python in-depth 05 decorator
========================================================== ========
Reference books and introductions
See bean column: http://book.douban.com/doulist/1619790/
========================================================== ========