Integers divide with integers:
>>> 2/50>>> 2.0/50.4>>> 2/5.00.4>>> 2.0/5.00.4>>> 7/23>>> 7.0/23.5>>>Note: integers divided by integers result in integers (the quotient);For example 7/2, quotient is 3 (integer), the remainder is 2, and the
1. A single backslash at the end of the line indicates that the string continues on the next line instead of starting a new row." This is the first sentence .... This is the second sentence. " ' This is the first sentence. This is the second
This instance is a meta-class instance, and the function is to record the class name of the subclass, and to display the class name of the subclass in a tree-like structure.Registerclasses inherits from type, which provides the ability to create a
Python variable, referring toVariable name = valueSome specifications for variable names
Only numbers, letters, underscores are supported
Number cannot start
You cannot use the name named by Python itself.
Python conditionsIf
In order to better and faster review later, this blog records my summary of the work. For the basic job, I think the most important thing is the process, as to whether the implementation is perfect, the code is not perfect, although important, but
Object-oriented programming (OOP)program = instruction + dataTwo types of paradigmsProcess oriented:Command-centric: writing around "What's going On"The program has a series of linear steps; The main idea is that code is used for dataObject-oriented:
Beginner Python (ix)--function Beginner Python, mainly finishing some of the learning points, this is the function.function definition:#-*-coding:utf-8-*- #definition of a functiondefmy_function (x):ifX>0:returnxelifx0:return-xElse:
Python Regular expression: REThe meta-character of the regular expression has. ^ $ * ? { [ ] | ( ). Represents any character[] to match a specified character category, the so-called character category is a character set that you want to match, a
First, SQLAlchemySQLAlchemy is a library of the Python operations database that is capable of ORM mapping.1. OrmORM English Full Name Object relational mapping, that is, objects mapping relation program, simply say we like python this
I've seen a little turtle before. 0 Basic self-study Python,b station with high-definition free resources [av4050443], but as the 0 Foundation is hard to learn, download the Python core programming pdf, here to do some notes.Although the use of the
Examples of previous studies are single-threaded sockets, and if multiple users are connected at the same time, all but the first one will be in a pending state until the current connected client disconnects.By using Socketserver, we can implement
There is a Dir function in the FTP module that prints out all the files in the current path, but this function does not return a value, just prints it out.There is also a nlst function that can return a list of file names, but only the file name, no
Python2Range (20)For I in range (10):Print (i)Range (1,10)-----from 1 to 9else: #如果for循环正常结束, execute Else statement (break is not the normal end) (Note: Else here is the for-same level as for loop)Break #跳出整个当前循环, jump one levelcontinue# jumps out
-------------------program operation principle-------------------1, the module built-in __name__ property, The main module value is __main__, Import module value is module name 1, creation time, PY file is newer than the PYC file, the PYC is
Mode key-value:dict={' xiaoming ': all, ' xiaohaong ':, ' Xiaomao ': $, ' Xiaoli ': 54};
Use the constructor to build the dictionary dict (tuple)/dict (a=1,b=2,c=3), zip to generate a dictionary of two identical lengths of list dict (zip
Build a Python environment and build a python Environment
1. Download and install Python at www.python.org
2. python-m pip install -- upgrade pip
3. Install common libraries: numpy, scipy, and matplotlib
Pip install numpypip install
Python built-in functions (18) -- enumerate, pythonenumerate
English document:
enumerate(Iterable,Start = 0)
Return an enumerate object.IterableMust be a sequence, an iterator, or some other object which supports iteration.__next__()Method of the
How to solve the problem of csv garbled characters written by python, and csv garbled characters written by python
Background
Recently, we developed a Daily Mail Program for our company. Generally, emails are forms, images, and attachments.
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