Because I want to do a small project, I intend to learn a back-end language, Na Na na, I chose Python. The first is the construction of the environment:1. Download:Python official website: https://www.python.org/, version has been updated to Python3,
Scenario: Request Verification code Module regvc.py read the configuration file Config.ini, the regvc.py module executes normally, but the run_all.py module executes the Times error in bulk, the section is not foundWorkaround: The configuration file
Built-in functionsList listsTuple tuplesData type: int boolData structure: Dict list tuple set strReversed () reversalKeep the original list to generate a reverse iteratorSlice () can generate a slice rule, infinitely applyFormat () to set the
Tag: Mem DMA Specifies a dot ADE TPS code to judge htmlHave to say, Python is really convenient, what to have whatAfter the automatic transmission of text messages, the mail is also ready to liveMain references:Enterprise 263 mailbox sent to QQ
What ' s the recursion? the definition of a recursive function: a function can be called again, if the function of the call is the function itself, then a recursive function is formed.The maximum recursion depth is 997, which is defined by the
1, scope-dependent1) Locals ()---------get a dictionary of local variables in the namespace where this method is executed#返回本地作用域中的所有名字2) Globals ()--Get a dictionary of global variables#返回全局作用域中的所有名字2, string-type code executionEval () executes the
OS.GETCWD () Gets the current working directory, which is the directory path of the current Python script workOs.chdir ("dirname") changes the current script working directory, equivalent to the shell CDOs.curdir Returns the current directory: ('. ')
Application migration encountered some special requirements, such as the need to generate some new config file by interaction, and then launch the application needs to rely on these files, so when the image is built there is basically no way to fix
character
meaning
.
Represents any character that matches except for a line breakNote: By setting up re. Dotall flag can be made. Match any character (including line breaks)
|
A | B, indicating A or
Python file type source code
Python source files with "py" extension, interpreted by the Python program, do not need to compile
BYTE code
Python source files are compiled with a file with the extension "PYc"
Compilation methodimport
With the keyword yield, you can generate a value from the generator and return it. We can use the generator as a producer .In the process, by using the keyword yield, you can also let a program with yield receive values. At this point the function
In multi-threading, locking is required for operations that share data in common.However, for local variables , each thread is independent of each other.If the thread t want to F1 the function in the local variable V1 to the function F2, F2 again
defFun (A, B, *args):Print(a)Print(b)Print(args)Print("="*30) ret= A +b forIinchArgs:ret+=IreturnretPrint(Fun (1,2,3,4)) Results:12(3, 4)==============================101, 2 are assigned to a, B, and the remaining parameters are assigned to args in
Python functional programming: higher-order functions, Map/reduce1 #function-type programming2 #one feature of functional programming is that it allows the function itself to be passed as a parameter to another function, and also allows a function
Python programming pygame module implements the mobile car sample code, pythonpygame
Pygame is a cross-platform Python module designed for video games, including images and sounds. Based on SDL, real-time e-game R & D is allowed without being bound
Python practice = build an FTP service with python code, and use pythonftp
Environment setup:
Python
Windows/linux
Pip install pyftpdlib (Installation failed Please download here: https://pypi.python.org/pypi/pyftpdlib)
One line of code:
Run it
Looking back at 2017, looking back at 2018, and looking back at 2017, looking forward to 2018I. Let's take a look at my goal for this year, which I set last year. 1. salary. I don't need to say that. 2. If I change to another field, I have many
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