#方式一class a (): def __init__ (self, name): self.name = name print ("a CLASS&NBSP, ...) class b (): def __init__ (self, age): self.age = age print ("b class ... ") class sub (a, b): def __init__
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:
The chicken saidLinks: https://www.jianshu.com/p/ceb99aed4b2eSource: PinterestNames and attributes can be located in BeautifulSoup by name and attrs to find specific HTML code. Even more commendable, ATTRS supports regular expressions.Such as:class="
1. Two ways to execute Python scripts1. Pyhon Interpreter python zhurui.py2, briefly describe the relationship between bits and bytes8 bits of one byte3. Brief description of the relationship between ASCII, Unicode, utf-‐8, GBK4. Please write
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
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 ()
One, Thread & processFor the operating system, a task is a process, such as open a browser is to start a browser process, open a notepad started a Notepad process, open two Notepad started the two Notepad process, open a word started a word process.
Mode
Description
R
Read-only
r+
Write
W
Write, delete the original file before re-writing, if the file is not created
w+
Read and write, first delete the original file,
I. Installation of Beautiful Soup LibraryWin platform: "Run as Administrator" cmdExecute pip Install Beautifulsoup4Installation quiz: from BS4 import BeautifulSoupSoup=beautifulsoup (' data ', 'html.parser')Print (Soup.prettify ())Second, the basic
Using the Format function for formatting strings in PythonSince python2.6, a new function Str.format () that formats the string has been added to the power. So, what's the advantage of being compared to the previous% format string?GrammarIt replaces%
Why do you need to learn python?Always had this plan, but never decided to start.I heard that the Python language structure is simple and graceful, powerful and portable, and the major websites are developed with Python. The idea of learning Python
First, exception handlingIn the process of running the program, you will always encounter a variety of errors. Program An error stopped running, then we can not let the program stop running it, this time we need to catch the exception, by catching
SVM: generates 100 random points, establishes a model, and finds out the hyperplane equations-Jaosn niu and svmjaosn.
import numpy as npimport pylab as pl from sklearn import svm# we create 40 separable points#np.random.seed(0) X =
Python note (1): installation + crawler environment configuration + packaging as an EXE file,
1,Install
Https://www.python.org/downloads/windows/Download the installer from the official website.
Windows x86 32-bit Operating System
Windows x86-64
Use python and Django to migrate the blog database, pythondjango
The configuration of the basic blog and the generation of the project have been completed in the previous section. This time, I started to learn about some basic operations of my blog
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