Chapter One Python basicsChapter II Python BasicsChapter III Python Basics-file Operations & FunctionsFourth Python basics-common modulesThe fifth chapter design and development of object-oriented programmingThe sixth chapter--socket development of
1 #Remember that you cannot have the same name as the method function, or you will get an error! 2 3 #Python's modules and packages are divided into three types:4 #1. Standard library5 #2. Third-party modules6 #3. Custom Modules7 8 #the introduction
Recently in the study of Python network programming this piece, in writing a simple socket communication code, encountered the use of the struct module, was not very clear at that time this has and effect, and then consulted about the relevant
For development or OPS, it is normal to use Python to perform some run-batch tasks, or to do some monitoring events. So how do you monitor the progress of your tasks effectively? In addition to adding Log to the task, can there be another way to see
Requirements: You can choose to go to each submenu from any level back to the previous layer you can exit the program from any level required new knowledge points: List, dictionary Use only one while loop1 #!-*-coding:utf-8-*-2 3menu =
Direct Assignment: is actually the object's reference (alias).
shallow copy (copy): copies the parent object and does not copy the inner sub-object of the object.
deep Copy (deepcopy): The Deepcopy method of the Copy module, which completely
SummaryPopular understanding __name__ = = '__main__' : If you call Syed Py, in the eyes of friends, you are Syed ( __name__ == ‘李凯‘ ) ; in your own eyes, you are yourself. ( __name__ == ‘__main__‘ ).If __name__ = = '__main__' means: when the.
Exception name
Description
Baseexception
base class for all exceptions
Systemexit
Interpreter Request exited
Keyboardinterrupt
User interrupt execution (usually input ^c)
1.getattribute () unconditional invocation2. Data descriptor (an instance of the class that defines the __get__\__set__ method)--Called by the GetAttribute () of 1, the data descriptor is converted to: the current class name. __dict__[' x '].__get__
1. _xxx cannot be used for ' frommodule import *', which begins with a single underscore, is a variable of type protected.That is, the protection type can only allow access to its own and subclasses.2, __xxx double underline is a variable of the
1, please list at least 5 PEP8 specifications (the more the better).First, code orchestration1, indentation. 4 spaces indent, do not use tap, do not mix taps and spaces2, the maximum length of 79 per line, the newline can use backslashes, preferably
Transferred from: https://www.cnblogs.com/AlwinXu/p/5424905.htmlQuick Sort (quickSort)The idea of a fast line: first select any data (usually the first number of the array) as the key data, and then put all the smaller than it in front of it, all
Processes and ThreadsWhat is a processThe program does not run alone, and the program is assigned resources to run only if it is loaded into memory, and this execution is called a process. The difference between a program and a process is that a
First, Brief introductionThree kinds of programming: object-oriented class-oriented process def functional programming defProcedure is a function with no return valuedefinitionfunction refers to the collection of a set of statements through a name
1. Open File2. Read/write the file3. Close the file# Open file, file path can be absolute path, the path before R is the meaning of the original character, do not escape the file path of the literal character# f= Open (R ' Lili ', ' a ', encoding= '
Python functionsFunctions are well-organized, reusable pieces of code that are used to implement a single, or associated function.Unlike a function definition in mathematics, a function can be called a subroutine in a computer.Functions can improve
Use of queue
Queue.qsize () #返回当前队列包含的消息数量Queue.empty () #如果队列为空, returns True, and vice versa falseQueue.full () #如果队列满了, returns True, and vice versa falseQueue.get ([block[, timeout]]) #获取队列中的一条消息, and then remove it from the queue, the
Believe that the coding problem has plagued many coder, recently encountered some pits to share to everyone.1, the general method: decode corresponding coding>>> B "ABCDE" B ' abcde ' # utf-8 is used here because it's a very common encoding, but you#
I've been learning about Python-based OpenCV these days, Development environment is under the Ubuntu16.04, learning is based on Python OPENCV development is basically functional programming, OPENCV provides most of the functional functions, as well
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