ImportRequestsImportRe#TODO Download each novel's homepage URL#TODO Cycle#1. Download the novel homepageNovel_url ='http://www.jingcaiyuedu.com/book/15205/list.html'Response=requests.get (Novel_url)#handles the explicit designation of the character
Getting Started with Python drawingStudied: https://zhuanlan.zhihu.com/p/34200452Api:https://matplotlib.org/api/pyplot_api.htmlplot.py:#Import the module as take aliasImportMatplotlib.pyplot as PltImportMatplotlib as mplmpl.rcparams["Font.sans-serif"
Python exercises One1, a brief description of the difference between the compilation and interpretation of the language, and separately listed which languages you know are compiled, which are interpreted type?For:Concept:Compiled language: A
DescribeThe Help () function is used to view a detailed description of the function or module's purpose.GrammarHelp syntax:Help ([Object])Parameter description:
Object--objects;
return valueReturns the object help
#1. n!def fact (N): if n = = 0: Return 1 Else Return N*fact (n-1)Print (Fact (10))#2. Fibonacci sequence F (n) =f (n-1) +f (n-2)def f (n): if n = = 1 or N = = 2: Return 1 Else return f (n-1) +f
On a lighter level, Python's memory management mechanism is divided into the following three areas:
Garbage collection
Reference count
Memory pool mechanism
First, garbage collection:Unlike languages such as C + + and Java,
Same point:
Both are the same parameters: Dict.get (Key, Default=none), Dict.setdefault (Key, Default=none)
If the specified key does not exist, both returns a default value of None
If the specified key is present, even if the
1. Type (x) to see the data type of the data x, the return value is the data type of X2, ID (x) view x in memory address, return value is x address3, Copy.deepcopy (list1) Copy the list in parentheses, different from the equal sign, replication can
A-depth copy# assignment operations, which are common to a list = [a.append= A + (666)print(A, B) #[1, 2, 3, 666] [1, 2, 3, 666]# for shallow copy, the first layer creates a new memory address, and starts at the second level# points to the same
Object-oriented (OOP): inheritance, encapsulation, polymorphism
#创建类: Class naming rules are capitalized, camel-
Class Foo: #Foo A keyword that represents the name of the class to be created #创建类中的函数 def Bar (self): #do
Conversion encoding and decoding between bytes and Strdel deletes an element corresponding to an odd digit by an indexFind Index by ElementFromkeys the value of multiple keys is aIndex cannot find an error by elementSort from large to smallDelete by
Below for you to share a detail of the numpy in the array of reconstruction, merging and splitting methods, has a good reference value, I hope to be helpful to everyone. Come and see it together.
1. Array Remodeling
1.1 One-dimensional arrays into
This article introduces the content is the Python environment configuration Pydev plug-in, has a certain reference value, now share to everyone, the need for friends can refer to
First, install Eclipse
1. Installing JDK and configuring environment
This article to share the content is about Python knowledge of the dice game, has a certain reference value, the need for friends can refer to. Recently learned some statistics and python knowledge, try to analyze the dice game. Dice according to
This article to share the content is about Opencv+python implementation of the camera call, has a certain reference value, the need for friends can refer to
Use the OpenCV videocapture () function to define the camera object, whose parameter 0
This article to share the content is about Python object-oriented access to object information, has a certain reference value, the need for friends can refer to
When we get a reference to an object, how do we know what kind of object it is and what
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