__init__ constructor Function__dict__ VARs () function to get the name inside the namespace__str__ str () function, the content of the output member-related informationThe __repr__ repl () function, as well as the output information, is a valid
Collections:Collections is a python built-in collection module that provides a number of useful collection classes.
Namedtuple
It is used to create a custom tuple object and to specify the tuple number of elements, and an element
Original address: blog.sina.com.cn/s/blog_4ddef8f80101eu0w.html Python's virtual environment allows a Python program to have a separate library and interpreter interpreter, without sharing a unified library and interpreter with other Python programs.
Implementation method:1, you can define a basic page access path First, for example: http://127.0.0.1:8000/index/define the index pathIn URLs1 urlpatterns = [2 3 url (r'^index/$', Views.index),4 5 ]2, also need to create a index.html
Write in front
Sixth day of class, Punch-in: Heaven and earth are unkind to all things for the dog;
First, the regular--Online regular tool: http://tool.oschina.net/regex/-Second, serialization-JSON-PickleIii.
Python's strength is that he has a very rich and powerful standard library and third-party library, almost any function you want to implement has the corresponding Python library support, later in the course will be in depth to explain the various
Install Python.
Select the Python version. If there is a python2.* version on the machine, enter Python in the command line to enter the python2.* environment. If there is a python3.* version on the machine, enter Python3 in the command line to
ImportMatplotlib.pyplot as Plt fromMpl_toolkits.axes_grid1.inset_locatorImportzoomed_inset_axes fromMpl_toolkits.axes_grid1.inset_locatorImportMark_insetImportNumPy as npfig, Ax= Plt.subplots (figsize=[5, 4]) y= x = Range ( -20,20) Ax.plot (x, y)
This article mainly introduced the Python condition variable's producer and the consumer operation, combined with the concrete instance form to analyze the python condition variable concept, the principle, and the thread operation related skill,
Development environment Editor Vim/sublimetext2/pycharm with good, I was from vim to Pychram. Integrated development Environment Auto-complete, single-step debugging and other functions are much better, is conducive to improve work efficiency. Local
Note: Disk partitioning and formatting are high-risk behaviors, please be careful. The following action is for the newly purchased data disk, if it involves the processing of the original data disk, be sure to create a snapshot of the ECS Windows
Python creates an image Verification Code instance,
The verification codes demonstrated here are simple. You can also distort the characters.
The Python third-party library is extremely powerful. PIL is a python d third-party image processing
Python Arithmetic Operators
Python Arithmetic Operators
Assume that variable a is 10 and variable B is 20:
Operator
Description
Instance
+
Add-add two objects
A + B output result 30
-
Python provides a function example for randomly generating valid mobile phone numbers and ID cards.
This example describes how to use Python to randomly generate valid mobile phone numbers and ID cards. We will share this with you for your reference.
Python data processing practices, python Data ProcessingI. Runtime Environment
1. The python version 2.7.13 Blog Code is of this version.2. System Environment: win7 64-bit SystemIi. Processing of messy text data
Some of the data is as follows. The
Python database operations-data tables, python Databases
Data Table:
Data Type:
Three forms of help:
Enter the following keywords in cmd: help, or? The key word or the key word that \ h wants to help.
Create a data table:
CREATE database
Python-decorator details, python-decoration details
Python --- decorator
Definition:
Essentially a function. It is used to decorate another function (that is, the function to be decorated) and add a function to the function to be decorated. The
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