program code optimization usually includes: Reduce the size of the code, improve the efficiency of the Code. This allows the program to run faster. Here's a concrete discussion of Python code optimization techniques. Improved algorithm,
Python's decorator is similar to java/c# 's annotation in its use, which is to decorate something for this method by adding a @xxx annotation to the method name. However, Java/c# 's annotation is also very daunting, too TMD complex, you want to play
Reverse () method
Reverses the ordering of elements in a list, such as the following
>>> x = [1,5,2,3,4]>>> X.reverse ()>>> x[4, 3, 2, 5, 1]Reverse list Reverse Sort: stores the order of elements in the original list from left to right without
• Use Regular "(? x) (?: [w-]+ | [X80-xff] {3}) "Gets a list of English words and Chinese characters in the Utf-8 document.• Use dictionary to record the frequency of each word/kanji, or +1 if it appears, or 1 if not.• The dictionary is sorted
In the above two articles have been introduced to the Python crawler and MongoDB, then I will crawl down the data into the MongoDB, first to introduce the site we will crawl, Readfree site, this site is very good, We only need to sign in every day
If there is no __init__ method function in a class, the instance object created by the class name is empty and the tangent is not initialized; If there is this method function, it is usually the first method function of the class, a bit like a
I. Basic CONCEPTS
Lookup (searching) is a data element (or record) in a lookup table that is equal to a given value, based on a given value.
Lookup table (search table): A collection of data elements (or records) of the same type
Keyword (key):
Calculations related to dictionary values
Problem
You want to calculate the value of a dictionary, for example, to find the item with the largest (smallest) corresponding value in the dictionary.
Solution One:
Suppose you want to find the item
The reason I put three of them together as a topic is because I've been working on these things for most of the past couple of days. Three of them have given me a big surprise, can say that the fun is endless ah.
OK, let's say, first of all, Python.
First look at the Zeplin color value display sample
Original processing mode
Because I would python (only the terminal input Python and then use it as a calculator, or hex() convert decimal to hexadecimal in a function), I would certainly use
This is done last year, a web vulnerability scanning gadget, mainly for simple SQL injection vulnerabilities, SQL blind and XSS vulnerabilities, the code is seen GitHub foreign great God (heard to be one of the writers of SMAP) two small tools
Introduction to Anaconda Theory
Anaconda Introduction and Installation Tutorial
Installation and simple use of anaconda under Windows
Official Website Anaconda Configuration Tutorial
ANACONDA distribution
Simple, efficient, in-science
A few days ago, someone in the group made a math problem for small:Suppose you have an unlimited number of stamps, with denominations of 6, 7, and 8, what is your biggest non-paying postage?Small series of fingers and toes forget, the answer is: 1.7
Python enables applications to add the open mode function in the context menu, and python context menu
Recently, a small tool developed by the project team wants to add an open method in the right-click menu. The youdao cloud note is used as an
Python automated development-variables, data types and operations, python Data Types
I. Variables
Variable definition: Variables are used to store infomation to referrenced and manipulated in a computer program.
Used to store the intermediate
Python data type-List (ADD, modify, delete, query, statistics, values, and sorting), python Data Type
A list is one of the most common data types. You can use a list to conveniently store and modify data.
Declare an empty list first:
>>> names = []>>
Python expert path [5] python-based regular expressions and python Regular Expressions
Lists the Python-supported regular expression metacharacters and syntaxes:
Character point: match any character
import rest = 'python'result =
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