Python sqlite3 Database is a very small built-in module, it uses a file to store the entire database, operation is very convenient, compared to other large databases, there are some gaps. But in performance is not inferior, little, perfectly formed,
Python's interpreter type:
CPython:
After installing Python, the official provides a Python interpreter CPython, written in C, and running Python at the command line is the CPython interpreter that launches the most widely used
OverviewThe Python file Seek () method is used to move the file read pointer to the specified location.GrammarThe Seek () method syntax is as follows:Fileobject.seek (Offset[,whence])Parameters
Offset--offsets, which represent the number
The previous article describes how to draw some simple diagrams with matplotlib. You usually need to add a lot of callout information on the diagram, such as adding a legend.1 ImportMatplotlib.pyplot as Plt2 ImportNumPy as NP3 4 5T=np.arange (0.,5.,0
Python implements a pruning-free decision treeImportMathImportNumPy asNpImportPydot"""make your own decision tree: no pruning"""classNode:def __init__( Self, data): Self. attr= -1 # Partitioning properties on the current node Self. Sons={}#
1, go to the space and special symbolsCopy the code code as follows: S.strip (). Lstrip (). Rstrip (', ')2. Copying stringsCopy the code code as follows: #strcpy (SSTR1,SSTR2)SSTR1 = ' strcpy 'SSTR2 = SStr1SSTR1 = ' Strcpy2 'Print SSTR23. Connection
Uppercase and lowercase conversions1 __author__="Kuankuan"2 Print("name is Jankinyu". Capitalize ())#Convert to first letter capitalization3 Print("name is Jankinyu". Title ())#To title Form Name is Jankinyu4 Print("NAMW". Lower ())#Convert to
Python provides the necessary functions and methods for basic file operation by defaultHow to open the file:Open (Name[,mode[buf]]) Name: File path mode: Open mode buf: buffer buffering sizeFile read mode:Read ([size]): Read file (read size byte,
The following 7 types of operators are supported in Python:1. Arithmetic operators:+ (plus),-(minus), * (multiply),/(except),% (remainder), * * (Power): Returns the Y power of X,//(DIVISIBLE): Returns the integer part of the quotient2. Comparison
Update content:
1. Increased Memory information acquisition
2. Increase Battery Information acquisition
3. Increase disk Information acquisition
4. Re-layout the form
5. Add the form name
6. Do not press until the connection
Getting Started with Python basic learning three data types
Python distinguishes between integer and floating point depending on the decimal point, with the decimal point being the float type.
E notation: E is the meaning of 10, is a
1. Package:What is encapsulation? (Encapsulation is not a pure meaning of the hidden, in fact, it can still be viewed)is to hide something that you don't want others to see.Encapsulating data: Purpose is to protect privacyFunctional encapsulation:
# Pillow Image ProcessingFrom PIL import Image, ImageFilter# Requests Processing Web requestsImport requestsMore Code Volume# using requests to realize the watercress simulation landingFrom BS4 import BeautifulSoup# PsutilImport PsutilPsutil is a
Python Learning Path (ii)
The following Python 3.6 is used
First, conditional statementsSimple judgment1 if Judging Condition: 2 EXECUTE statement ... 3 Else : 4 Execute statement ...Complex judgments1 if Judging condition 1: 2
To judge the contents of a string, returning a Boolean type#-*-Coding:utf-8-*-__author__ = "MuT6 sch01ar" print (' Python '. EndsWith (' on ')) #判断字符串是否以on结尾, returns the Boolean type print (' Python '). StartsWith (' py ')) #判断字符串是否以py开头, returns
Python advanced features-Slice ),
Define a list:
1
L = ['haha','xixi','hehe','heihei','gaga']
Take the first three elements:
>>> L[0],L[1],L[2]('haha', 'xixi', 'hehe')
This method is a bit silly, because if there are many elements,
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