Concept of function # concept # wrote a piece of code to implement a small function; Then put the code into one piece and start with a name; The next time you can use this code block again under this name, this is the function # Action #
merge Sort execution process:1, the implementation of the merge sorting function, the total number of two in two, continue to call the function itself recursively, left half right half of the division open, until only one element in each copy, stop
have been very curious about the installation progress bar, or start the program shows how the progress bar is implemented, after learning Python, the Sys module has a method can be implemented, the code is as follows:
123456
Import
Select Sort:
Time complexity O (n**2)
There is no way to know whether the current wheel has reached the sorting requirements, but it is possible to know whether the extremum is at the target index position
Traversal count 1,..
It's easier to remember with built-in setL1 = [' B ', ' C ', ' d ', ' B ', ' C ', ' A ', ' a ']L2 = List (set (L1))Print L2There is also a speed difference that is said to be faster and not tested.L1 = [' B ', ' C ', ' d ', ' B ', ' C ', ' A ', ' a '
In the process of using Python encountered a lot of problems, the knowledge point is scattered, through this paper to summarize.One, Python's Itertools moduleCombinations function: Combines the list by a given length. from Import = [1, 2, 3, 4= []
The topics are as follows: Enter a complex list of nodes with node values in each node, and two pointers, one pointing to the next node, and another with a special pointer to any node, returning the result to the head of the complex linked list
Pycurl is a C language written in Libcurl python implementation, the function is very powerful, support operation protocol has ftp,http,https,telnet and so on.Common methods of Module description:The close () method, which corresponds to the
What is an adorner?The adorner itself is a function and adds additional functionality to other functionsThe principle of adorners: 1. Do not modify the source code of the Decorated object 2. do not modify the calling method of the decorated
Regular Expressions
The
\d Match a number\w matches a letter\s matches a space or tab space character[] matches a range, such as [0-9a-zA-Z\_] a number, letter, or underscore that can be matched. Represents any one character?
1, filtering problemsfind the string starting with IP _input= ['ip_10.2.223.5','ip_10.2.220.3','port_22','port_8001','port_80','ip_172.16.8.35'] forIteminch_input:ifItem.startswith ('IP'): Print(item)Built-in function filter (FUCN,SEQ)Python2:
The installation process is a reference to the Pythonwebdriver Environment Building section of the Selenium2python Automated testing practiceDuring the installation process, encountered a number of problems, summed up, for the future to encounter
---restore content starts---1, serialization and deserializationThe process of changing an object (variable) from memory to a storage or transfer is called serialization, which is called pickling in Python.In turn, re-reading the variable contents
A simple decorative device1. Why use adornersThe function of the adorner: the function of the original function is extended without modifying the original function and its calling modeThe essence of adorners: a closure functionlook at a simple
I. Understanding of Python1. The standard implementation of Python is to compile the statement of the source code into the form of a bytecode and then interpret the bytecode. Because bytecode is a platform-independent form, bytecode is portable. But
Users who often use Excel know that the existence of merged cells, this article mainly introduces the use of Python How to bulk merge Excel files with merged cells, the article through the sample code introduced in very detailed, to everyone's study
Pycurl is a Libcurl Python binding library written in C. Libcurl is a free and easy-to-use URL transfer library that is used in the client. It's very powerful, and Pycurl is a very fast (reference multi-concurrency operation) and rich full-featured,
This article mainly introduces the Python timing to modify the database sample code, small series feel very good, and now share to everyone, but also for everyone to do a reference. Let's take a look at it with a little knitting.
When we need to
This article mainly describes how to write files in the Python file txt, small series feel very good, and now share to everyone, but also for everyone to make a reference. Let's take a look at it with a little knitting.
1. Write your own
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