1. Module 1.1 Concepts
Each .py Python source code file that ends with an extension is a module;
The module name is also an identifier and requires a naming convention that conforms to the identifier;
The global variables, functions,
Object-oriented combination usageAn object in one class as a Data property (an object that references another class in one class)A "have" relationship:For example: Define a Human & 1 weapons class and then Zhang San have a gun, Lee four, a
1 #-*-coding:utf-8-*-2 3 #function4 #the rules for defining functions in Python are as follows: Starting with Def, following the function name and (), passing in the arguments and variables in the middle of the parentheses, the function to:
1. Wedge 2. Process vs Object orientedProcess-oriented: process (pipelined thinking)Advantage: Greatly reduce the complexity of the writing program, just follow the steps to be executed, stacking the code can be.Cons: The process is used to solve a
I. Background of writingRecently have to learn python, occasionally write some small procedures, the problems encountered in the record, the big God do not spray ~In order to solve the No module named _sqlite3 problem, we all know that Python has a
One, under Windows Python installation : 1. Download the installation packagehttps://www.python.org/downloads/2. InstallationDefault installation path: C:\python33. Configure Environment variables"Right-click Computer"-"Properties"-"Advanced system
I. Introduction to the Random moduleThe random function in the Python standard library can generate randomly floating-point numbers, integers, strings, and even help you randomly select an element in a list sequence, disrupting a set of data, and so
First, mathematics-related1, Absolute Value: ABS (-1)2, Maximum minimum: max ([+ +]), min ([[+])3. Sequence Length: Len (' abc '), Len ([+]), Len ((+))4, take the mold: Divmod (5,2)5. exponentiation: Pow (2,3)6, floating point: round (1)Second,
Variable1. Variable declarationRules for variable definitions:
Variable names can only be any combination of letters, numbers, or underscores
The first character of a variable name cannot be a number
The following keywords
Sesame HTTP: JavaScript encryption logic analysis and Python simulation to achieve data crawling, javascriptpython
This section describes how to analyze the JavaScript encryption logic and use Python to simulate the process of JavaScript data
Python daily Bug set and pythonbug
1. TypeError: 'int' object is not iterable:
Scenario example:
Data = 7for I in data: print (I) # cause: it is caused by iteration of int data directly. The value is changed to: for I range (data): print (I)
2.
How to Use Python to create chatbots and python chatbots
I recently studied the API and found a very useful python Library: wxpy. Based on itchat, wxpy uses the Web communication protocol to implement functions such as logon, sending and receiving,
Sesame HTTP: Installation of Flask, sesame httpflask
Flask is a lightweight Web service program. It is simple, easy to use, and flexible. It is mainly used for some API services.1. Related Links
GitHub: https://github.com/pallets/flask
Python implements k-means clustering algorithm and pythonk-means clustering
K-means clustering algorithm
K-means is an algorithm that discovers k clusters of a given dataset, that is, an algorithm that aggregates a dataset into k classes.
The
Python opencv histogram reverse projection method, pythonopencv
This article introduces the python opencv histogram reverse projection method, which is described as follows:
Objectives:
Histogram reverse projection
Principle:
Reverse projection can
Python2.7 how to read the names and content of all files in the folder, python2.7 file name
A little idle time recently, so I reviewed the python basics I have learned before. Record your income.
First of all, the installation of thon2.7 is not
Python3 uses Dlib19.7 to calibrate 68 facial feature points, python3dlib19.7
0. Introduction
Using the officially trained Dlib model "shape_predictor_68_face_landmarks.dat" for 68-point calibration, using OpenCv for image processing, drawing 68
Only 27 lines of Python code can be converted to pdf in batches !, Python27 rows
This is a pythonscript that can batch convert the Microsoft powerpointfile (.ppt0000.pptx) to pdf format.
Instructions for use
1. Place the script and the pptfile in
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