First, the main content:Interface class: ( Only in the work, writing a specification.)Abstract class:Usefulness: At work, if you prescribe several classes, you must have the same method, if you are abstract class.Packaging:1, put some properties or
Using Python to read the data in the Excel file with the password, the program code is as follows: #filename: readingxls.py "This program is used to read data in an Excel file with a password in Python. First install the XLRD third-party library via
The Deque module is an item in the Python standard library collections, which provides a sequence that can be manipulated at both ends, which means that you can perform add or delete operations before and after the sequence.1. Create the deque
03_ Object-oriented _day01
An object-oriented abbreviation?Object-oriented programming--object oriented programming shorthand OOP, is a programming idea or method
Object-oriented and process-oriented differences?Process-oriented is an early
#-*-coding:utf-8-*-#definition of default parametersdefTest (a,b=10): Print(A +b)#The default parameter must be defined at the end of the parameter list and cannot be defined before the normal parameter#def Test (A,B=10,C)---this way of
1. Deep copy vs Shallow copyDeep and shallow copies in Python are the same as in Java,
The so-called shallow copy is the copy of the reference.
(The data inside is not copied, and the data is in the same address space as the data in
Closures:Two nested functions, external functions return the internal function of the argument, external function?def external function (parameter):def intrinsic function ():Passreturn intrinsic functionThe difference between him and the function:1.
21, image smoothing, median filteringThe neighboring pixels are arranged by size, and the values that are arranged in the middle of the set of pixels are used as the median filtered pixel values.Medianblur functionDst=cv2.medianblur (src,ksize) src,
The automated test scripts are written in Pycharm and can be run properly in Pycharm, because they are executed automatically when unattended, and they are executed without the need to be pycharm and executed directly with the command. But execute
For example, now I have one of the simplest addition (JIAFA) functions:def jiafa (x, y):z = x + yReturn ZPrint (JIAFA)This is very simple, you can see that the output equals 3.The next question is, how do I calculate if I want to add a number that
Turtle Drawing VillainImport Turtleturtle.setup (700,700,100,100) #setup () Set the form size, the latter two parameters are optional, and the function is not required for the Turtle.speed (Ten) #设置画笔移到速度, the parameter value is 0-10, The larger the
General Decoration Device# (@+ function name), you need to remember the key two points:#功能:#1, automatically executes the outer function, and passes the function name F1 below as a parameter#2, re-assigns the return value of the outer function to F1#
One, nested functionsThe inside of the function defines another function, which is called the nested function, inside the function is called the inner function.Example:Second, return functionA function can receive a function object as a parameter,
1. Dictionary operationA dictionary of Key-value data types.Grammar:1info = {2 'Car01':"Camry",3 'Car02':"Teana",4 'car03':"Accord",5}Features of the dictionary:
Dictionaries are unordered.
Key must be a unique
Increase>
Anaconda InstallationFirst go to Anaconda's official website, as shown, you will see the Anaconda download page:2, pull down or click the Windows option in the diagram to get the interface as shown, at this time you can choose according to their own
Recently need to make a part of the data, need to use the name, and the script to generate some random combination of Chinese characters, rather than crawling some seemingly real names on the web, so find the surname Daquan website, url:
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