Today, using Python and selenium to crawl dynamic data, mainly through the constant updating of the page to achieve data crawling, data to be crawled, such asSource:#-*-coding:utf-8-*-Import Time
Psutil Module IntroductionPsutil is an open-source, cross-platform library that provides convenient functions for obtaining information about the system, such as CPU, memory, disk, network, etc. In addition, Psutil can also be used for process
Key points of study today (source: Liao Xuefeng official website)Python data types include:
Integer
Floating point number
String
Boolean value
Null value
Take a look at the difference between each data type:
Integer:
-------------------------------------------Font Color | Background Color | Color Description------------------------------------------- | | Black | | Red | | Green |
s = Set ()#Create an empty collectionS2 = {'1','2','3','3','4'}#No: The set is born to go heavyS3 = {'2','8','9','1'}#collections are also unordered.#S2.add (' a ') #添加值#s2.remove (' 2 ') #删除值#S2.pop () #随机删一个值#print (s2)" "intersection" "#Print (S2.
A collection is an unordered, non-repeating combination of data, and its main functions are as follows:
Go to the weight, turn a list into a set, and then automatically go heavy.
Relationship test, test the intersection of two sets of
Impressions:There's no waves in my heartProblem:No English is a mishap#Grade Item CategoryclassScore:lesson_name="Course Name"score= 0#score #when the transcript is initialized, you need to provide the value of two attributes for this transcript
The test system is: Centos 6.7The Python version is: 3.6.4Scripting features: Conversion of common units, where memory is used to simulateImport Pstuildef Bytes2human (n): symbols = (' K ', ' M ', ' G ', ' T ', ' P ', ' E ', ' Z ', ' Y ')
1.file---Default is output to (), if set to (), output to ()2.SEP---printing (), default = ()3.end---The end of each print, the default is ()4.flush---Immediately output the content to (), do not ()5.eval ()---have return (), mainly used for ()
The "" "polymorphic feature is that invoking different subclasses will produce different behaviors without having to know exactly what the subclass actually is," "Class audiofile: def __init__ ( Self, filename): if not filename.endswith (
The bubbling sorting algorithm works as follows: (from small to large)
Compares the adjacent elements. If the first one is bigger than the second one, swap them both.
Do the same for each pair of adjacent elements, starting with the
Singleton mode, ModeWhat is Singleton mode?
Singleton mode is a common software design mode. Its core structure only contains a special class called Singleton. The Singleton mode ensures that only one instance is available for a class that applies
Singleton mode, Mode
I. Singleton Mode
The Singleton mode can be divided into four types: 1. File, 2. class, 3. Implement Singleton mode based on the _ new _ method, and 4. Implement the singleton mode based on metaclass.
2. Class
Python day 8 (3) obtains object information ., Pythonday
1. Get object information (Object Type and method)
Method 1:
The basic data type of a can be determined by the type () function.
>>> type(123)>>> type('str')>>> type(None)B. If a variable
Python _ builtins _ copyright class (14 ),
14. 'copyright', copyright
Class _ Printer (builtins. object) | interactive prompt objects for printing the license text, a list of | contributors and the copyright notice.Interactive notification object
(2) The first program and the first program
1. Installation
Download python3.6.4 from https://www.python.org/downloads/.
If you are a windows \ mac computer, double-click the installation package, one way to next, if you are linux please refer to
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