Python's set is similar to other languages and is an unordered set of distinct elements, with basic functionality including relationship testing and de-duplication elements. The collection object also supports mathematical operations such as Union
The first step is to install Python first, and the version selected by blogger is the latest version of 3.4.2. The Python installation under Windows is typically installed through the software installation package instead of the command line, so
ListStore a set of data that can be accessednames = ["Kang","Lily","Mery"]Print(names)#Print by indexPrint(names[0],names[1])Print(Names[-1])#-1 indicates the last digit#slicesPrint(Names[0:2])Print(Names[0:-1])#print a range, ignoring the end of
First, line and indent The biggest difference between Python and other languages is that Python's code block does not apply braces {} to control classes, numbers, and other logical judgments. Python's most distinctive feature is the use of
Causes and phenomenaMatplotis a powerful Python chart drawing library, unfortunately the current version of the font library does not support the Chinese font. So if you need to display Chinese in the drawing, it will be displayed as a square
A chance I saw a QQ number in a group is always based on the message you send your own initiative to reply, at that time very feeling wonderful. I know to be able to simulate the login site, unexpectedly can also be simulated login QQ, the first
Statements and syntaxThere are some basic rules and special characters in the Python statement:
Pound key "#" means the following character is a Python comment;
Three quotes ("") can be multiple lines of comment
A newline "\ n" is a
Anaconda is an integrated Python and package management software, remember the earliest use in 2014, when there is no information online, need to use both py2 and py3, when the practice is to install ANACONDA2 and Anaconda3 at the same time, modify
1. Open the file to get the file handle and assign a value to a variable2. Manipulate the file through a handle3. Close the fileSample files' How are you? ' I'm in the super-uh, bye .Basic process of file operationF=open ('Chenli', encoding='Utf-8')
Used to generate and modify common configuration documents, the name of the current module is changed to Configparser in the Python 3.x version.Here's a look at a lot of the common document formats for software
123456789101112
What is capture? After you use parentheses to specify a subexpression, the text that matches the subexpression (that is, the matching content) can be used in an expression or other procedure, and the following article focuses on the relevant data
This article mainly introduces the static methods in Python and class members of the relevant information, the text through the sample code to give you a detailed summary of the two in the syntax and use of the difference between the need for
If you plan to upgrade Django from a previous version, you will need to remove the old version of Django before installing the new version. The following article mainly introduces you to the method of re-installation after Django Uninstall, the
This article mainly introduces Python and go in the way to manipulate the Slice,list instance code of the relevant information, the need for friends can refer to the following
Example code for how Python works with slice,list in Go
Go code to
This article mainly describes the Python escape character details of the relevant information, the need for friends can refer to the following
Python Escape character
Python uses a backslash (\) to escape characters when special characters are
This article mainly introduces the Python regular simple example, specifically analyzes the python's simple regular matching test for strings and related considerations, the need for friends can refer to the following
The examples in this article
Python grocery stores and python grocery stores
String formatting
There are two ways to format Python strings: percent and format.
The percent sign method is relatively old, while the format method is relatively advanced. It attempts to replace the
Python magic method attribute access (_ getattr __, _ getattribute __, _ setattr __, _ delattr _), pythondelattr
In general, some magic methods for Attribute access will be involved when we are in the category class or instance object, mainly
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