I. Integrity constraintsConstraints are similar to data type widths and are optional parameters that are used primarily to ensure data integrity and consistency.1, NOT NULL and defaultNull is nullable, the table defaults to null, and empty content
Python's basic built-in data types are:Basic data types, such as Integer (number), string, tuple, list, dictionary, and Boolean types. 1) integral type--int--digitPython has 5 types of numbers, the most common being the integral type Int,int Python
Although Google is now the boss, Python naming is often followed by Google, but the individual still feel that the camel name and underline mixed together a little uncoordinated.Or simply underline, but the more you hit an underscore is the cost of
Python type conversionFunction descriptionint (x [, Base]) converts x to an integerLong (x [, Base]) converts x to a long integerFloat (x) converts x to a floating-point numberComplex (real [, Imag]) creates a complex numberSTR (x) converts an
Two week class (October 23)1. Common ways to learn Python listsA list is made up of elements arranged in a sequence in a particular order. You can add anything from strings, numbers, dictionaries, and so on to the list, where there is no
1. ListA = [' A ', ' B ', ' C ', ' ABC ']# # Append End AppendA.append (' Hello ')Print (a)[' A ', ' B ', ' C ', ' abc ', ' Hello ']# # Pop End DeleteA.pop ()Print (a)[' A ', ' B ', ' C ']# # IndexPrint (a[0],a[1])(' A ', ' B ')Print (A.index (' B ')
"One: The role of *,-1"Give you two examples: 1 a,b,c,d= " spam " 2 print (a) 3 print (b) 4 print (c) 5 print (d) 6 a,*b= " Spam " 7 print (a) 8 print (b) The above example is the most simple example of the function of
This article introduces the installation process of Linux host Python Paramiko in the intranet environment.If the host can access the Internet, a command will be able to all the program dependencies are installed, but the actual production
List1 = [1,2,3,4,5,6,7,8,9,10]List2 = [' A ', ' B ', ' C ', ' d ', ' e ', ' F ']Basic Operations1. Delete the specified elementDel List1[2] deleted 3 in listSupport slices: del List1[1:3] to delete 2 and 3 in the list2. Shard Assignment1Name = List (
for x in ...A loop is a statement that puts each element into a variable and x then executes the indented block . Note: Formatting in Python also acts as a syntax rule, and indenting a block is an examplesummation problem, comparison and similarity 1
Read keyboard input: Raw_input inputThe Raw_input ([prompt]) function reads a line from the standard input and returns a string (minus the end of the newline character):str = raw_input("Please enter:"); Print "What you have entered is:", str
Overall outlineOne1,int. Number: operation. 1, 2,3 ...2,bool. true: false.3,str. Simple and small amount of storage data, and the corresponding operation name = ' Alex ',4,tupe. (1, ' Alex ')5,list: Large amount of data, [1, ' ses ', true,[1,2,3],{'
The following are common software packages developed by Python.
Name
Use
Installation commands
Opengl
sudo pip3 install Pyopengl
Pyqtgraph
GUI Graphics Library
sudo pip3
Tag: Phone class exists line execution character string named spanGlobal variables: Global variables can be accessed throughout the program scope.Local variable: A local variable can only be accessed within its declared function.Globvar= 0Def
Python deletes elements from listPaul's classmates had to turn away a few days ago, so how do we remove Paul from the existing list?If Paul's classmates were in the last one, we could delete them using the list pop() method :>>> L = [' Adam ', '
Package
Package, which is a folder containing __init__.py files, is created to organize files (modules) in folders.Python3, even if there is no __init__.py file in the package, the import can still be used. and Python2 in the package must
Data capture and analysis (python + mongodb) and pythonmongodb
Share something dry !!!
Python data capture and analysis
Programming module: requests, lxml, pymongo, time, BeautifulSoup
First, obtain the category URLs of all products:
1 def step ():
Python functions,I. Functions
1. reduce repeated code
2. Easy to modify and expand
3. Maintain code consistencyIi. Function Format
Def function name ():
Function bodyIii. Naming rules for function names:
1. The function name must start with an
Python learning Common Good websites, python Learning
The following summarizes the URLs or resources that you commonly use when learning python, including the blogs of many people, so that you can find resources from this portal.
1.
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