One, Operator:1. Arithmetic Operation:2. Comparison operation:3. Assignment Operation:4. Logical Operation:Attention:No () is a priority, first ()No () No priority, look backwards,According to the smooth execution, if the first set up, followed by
Function: Refers to the collection of a set of statements by a name (function name) to encapsulate, to execute this function, just call its function name.def sayhi (): # function namePrint (' Hello World ')Sayhi() #调用函数, call the function with
First, why Choose Python?1, Python is the pursuit of finding the best solution, in contrast, other languages are pursuing a variety of solutions.2, Python's greatest advantage is that you can focus on solving problems rather than understanding the
02, the application of the function name (the first object).# 1, the direct print function name gets the memory address of the function # Print (FUNC1)#2, the function name can be assigned a value operation.# def func1 (): # Print (666)# f1 =
1. Yesterday's content reviewDynamic parameters*args: All positional parameters are accepted.**kwargs: All the keyword parameters.Formal parameter order: positional parameters, *args, default parameters, **kwargs* Model Usage:When the function is
Pymongo to manipulate the MongoDB database, but writes the operation code of the database directly in the script, which makes the application's code more coupled, and is not conducive to the optimization of the management of the CodeThe general
1. Python BenefitsSimple, elegant, clearPowerful module third-party libraryEasy to transplantFacing diagonalCan be extended2. DisadvantagesCode cannot be encryptedSlow execution speed3. Variable definitionThe first letter must be a case, or
String Introduction
Think about it:
When the browser to login to some sites, you need to enter a password, the browser to send the password to the server, the server will verify the password, its verification process is to save
First of all, put the code here, and then have time to explain the problems in the program,This small program knowledge to implement the function, and there is not much to the layout of the pursuit ofSome comments are not deleted, and there is no
1. What is the basic syntax and function of the function?function is derived from mathematics, but the concept of "function" in programming is very different from the function in mathematics, the specific difference, we will say later, the function
Operations related to python strings and python strings
Python string-related operations
1. string SEARCHName = "today is a \ t beautiful day"Print (name. capitalize () # uppercase lettersPrint (name. center (40, '-') # center display, fill in '-
One, function-type programming
Create a function
A function is composed of the keyword Def, with the function name and the parentheses colon, and the arguments in parentheses, when you want to execute the function, just write the function name and
Python Data Type & character encoding, python Data Type
I. Number
Integer int
x=10 #x=int(10)print(id(x),type(x),x)
Float
salary=3.1 #salary=float(3.1)print(id(salary),type(salary),salary)
Ii. String
name='hantao'
# Value by index (forward and
Python basic 3 file functions,
Today, I will review the previous knowledge about file operations. The operations on files mainly consist of the following parts:
I. Basic file knowledge
1. Basic File Operations
File operations can be divided into
-- Delete the table use [20130823_Recource] godroptablemy_table1, my_table2, My_table3 -- create the table use [distinct] goif (exists (select * fromsys. objectswhere) Then (Idintprimarykeyidentity (1)
-- Delete the table use [20130823_Recource] go
Listfirst, the basis of the listObjective:Arrays: putting together a bunch of data of the same typeList: put a bunch of arbitrary types of data together (based on the variable no type, the data in the list has no Type)Grammar:List name
Python full stack development "basic three"
The content of this section:
Functions (global and local variables)
Recursive
Function
I. Definition and usefunction is most important to reduce
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.