This is a personal study note, non-tutorial, the content will be a bit confusing
Minimalist Tutorials
Data Type
We can use the type() function class to get the type of the object, the built-in data types in Python3 include:
Python's multiprocessing module is used to create multiple processes, and the following summarizes the usage records for multiprocessing.
Multiprocessing creating a multi-process comparison between Windows and Linux systemsFork ()
import ospid =
1. Supplementary data types 1, 1 tuplesWhen there is only one element in the tuple and there is no comma, the data type is the same as the element inside the parentheses.TU1 = (' Laonanhai ') tu2 = (' Laonanhai ') print (TU1, type (TU1)) print (TU2,
1. Create a CollectionCollections are created differently than the first two data structures.The collection is created by the set (Iterable) method, and the parameter iterable is an iterative object.Example code:S1 = set (' Learn every day ') #
The crawled Web page address is: https://movie.douban.com/top250When you open a webpage, you can see that TOP250 's movie is divided into 10 pages, each with 25 movies.Then to crawl all the movie information, you need to know the other 9 pages of
File operation steps: 1. There is a file, 2. Open the file, 3. Read and write the modified file, 4. Close the fileOne. one file: New or imported fileTwo. Open file: If it is the new file default and the py file in the same directory, if it is open
Variables (variable) are a very important concept in the Python language. The main function of a variable is to give a name to a value in a Python program. Similar to "Zhang San", "John Doe", "King two leper" the same name, easy to remember.?? In
In Python, you can use the keyword "int" to implement other data types to force conversions to shaping data. However, it is important to note that there are long integers in the python2, but in Python3, no matter how long the numbers are, they are
Linear table ApplicationsSolution to the problem of--josephus (Python version)Josephus problem Description: Suppose that there are n people sitting around a circle, now request from the K -person began to count off, the number of people reporting
In the previous article "cityengine uses Python scripts to export roads by feature as a whole", we introduced how to export roads according to objectid of GIS Road Data. Users raised several questions during use, such:
1. The script is used in the
Chapter 5-dict objects
Similar to the map of C ++ STL in Python, dict is a ing container (key-> value), but the implementation principle is different. Because python uses a large number of structures such as dict (such as the Intese mechanism of
Python Unicode and Chinese Processing
From: http://hi.baidu.com/jackleehit/blog/item/ea93618e1051131cb31bbaac.html
Unicode in python is confusing and difficult to understand. This article strives to completely solve these problems;
1. Unicode, GBK,
Introduction:Developers who are new to Python often find that the yield keyword is used in many Python functions. However, the execution process of functions with yield is different from that of common functions. What is yield used for? Why design
Background:
1. All computers in the company connect to the Internet through a proxy server (only HTTP requests sent from the internal network can be sent to the Internet, and all packets from the Internet will be intercepted)
2. An employee of an
The random module in python is used to generate random numbers. The following describes the most common functions in the random module.Random. Random
Random. Random () is used to generate a random number of points 0 to 1: 0 Random. Uniform
The
Reprinted from pc10
Common functions
ABS (X)ABS () returns the absolute value of a number. If a plural number is given, the return value is the modulo of the plural number.>>>print abs(-100)100>>>print abs(1+2j)2.2360679775
In general, a server client that only supports one chat room uses Telnet
Books: Python Data Summary
Python tutorial here is the source code in Chapter 24th. It is used for practice research.
# Coding: utf8 # python2.7 chatser2.py # a slightly more
0. The most important built-in exceptionException: The base class of all exceptions.Attributeerror: attribute reference or assignment ErrorIoerror: attempts to read or write a file that does not exist.Indexerror: use index that does not exist in
A "french verb displacement tool" implemented in python is released. You can download all the source code from here:
Http://www.contextfree.net/wangyg/c/conjugator/index.html
French verbs are difficult to change. There are not many simple tools
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