Linux default installation python,centos6.5 default PYTHON2.6,CENTOS7 default Python2.7mac Default installation python2.7windows: Download the Python installation package on the official website, then configure the environment variables to include
DescribeThe Python tuple tuple () function converts the list to tuples.GrammarThe following is the syntax for a tuple:Tuple (SEQ)Parameters
SEQ-the sequence to convert to tuples.
return valueReturns a tuple.InstanceExamples of using tuple are
Version on-line, there is a process of data washing.Generate SQL based on a file.Accustomed to the use of PHP, a very simple few lines of code to write it out. Because I did not write Python, I would like to use the py write down, although there is
Practical Series Articles:1 stuttering participle and natural language processing HANLP processing notes2 Python Chinese corpus batch preprocessing notebooks3 Notes on Natural language processing4 Calling the Natural Language processing tool in
Today I've learned more about Python's outlook and basics (development tools, variables, formatted output, loops)1.python variables: Used to store data, dynamic types that don't need to be defined, but require strong conversionsName=
1. Download pythonEnter the official website download install click Open Link (official website address: https://www.python.org/downloads/), after entering the official website according to own demand chooses python2 or Python32. Install
__call__In Python, the function is actually an object:>>> f =Abs>>> F.__name__‘Abs' >>> F (-123) 123Because F can be called, F is called a callable object. All functions are callable objects.an instance of a class can also become a callable object,
Defined:The find () method detects whether the string contains substrings of STR, and returns 1 if the specified beg (start) and end (end) ranges are included in the specified range, if the containing substring returns the starting index
This article mainly describes the use of Python to manipulate Excel file instance code, the need for friends can refer to the following
The class library used
pip install openpyxl
Operation implementation
• Workbook actions
# coding:utf-8from
Sequence addition,
1 # Use the plus sign to connect the sequence. Enter the following: 2 >>> [, 3] + [, 6] 3, 5, 6] 4> a = [1, 2] 5> B = [5, 6] 6> a + B 7 [1, 2, 5, 6] 8 >>>> s = 'hello' 9 >>>> w = 'World' 10 >>>> s + w11 'helloworld' 12 # As shown
Day2 -- command summary, day2 -- Summary
1. mkdir create directory-p recursion (used to create a hierarchical directory, the underlying directory does not exist)
2. Create a file with touch
3. ls List Directory
4. Switch the cd directory
5. Print
Django Image Upload,
To perform image operations in python, you need to install the installation package PIL.
pip install Pillow==3.4.1
There are two ways to upload images in Django:
Upload images in admin
Upload images in a custom form
After
Django static file, django staticStatic files
CSS, images, and js files in the project are static files.
Static files are usually put in a separate directory for convenient management.
When calling an html page, you also need to specify the path
Intermediate key,Intermediate key
Middleware in Django is a lightweight, underlying plug-in system that can intervene in Django's request and Response Processing Process and modify Django's input or output
The middleware design provides developers
Python3 operator and python3 Operator1. python Arithmetic Operators
>>> A = 15 >>> B = 5 >>> a + B # Add 20 >>> a-B # Minus 10 >>> a * B # multiply 75>> a/B # division, for floating point number 3.0 >>> a % B # modulo, remainder 0 >>> a ** B # power,
Django obtains complex ajax post objects, djangoajaxpost
1. The post object in django's request is empty (that is, the post object transmitted by the front-end ajax cannot be obtained)
1. Comment out django. middleware. csrf. CsrfViewMiddleware in
Do you use pyton3 numbers ?, Pyton3 numeric
'''The numeric data type is used to store numeric values.The data type cannot be changed, which means that if the value of the digital data type is changed, the space will be reallocated.1. del (used to
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