Implementation process:The character color of terminal is controlled by escape sequence, and it is the system display function in text mode, which is independent of the specific language. The escape sequence begins with the ESC, which is done with \0
Mutable and immutable Type objectsMutable and immutable, essentially changing the memory address After the data is changed
Variable type, non-hash
Immutable type, can hash
List
String
StackStack, which is called a stack, is a container that can be stored in data elements, access elements, delete elements, and it is characterized only by allowing the addition of data (English: Push) and output data (English: Pop) to one end of the
1 ASCII code: American Standard code for information InerchangeThe first binary and Character encoding mapping table used in the United States2 Gb2312, Gbk1.0, Gbk10830China's first set of coding table Gb2312, only contains Simplified Chinese
Python Logging ModuleIn view of the complexity of recent projects, the simple print debugging method has been unable to meet the growing bug, so bloggers turned to logging.First, basic usageCan be used directly as print# coding=utf-8import
python Development Development languageHigh-level language: python,java,php,c#,go ... = = "character codeLow-level language: C, assembly = = "Machine codeThe contrast between languagesPython Java: Can write Web pages, can also do background-python
Advantages1. Simple syntax2, free, open source3, cross-platform, portable, window, Linux, Mac Universal4. Supports both process-oriented and object-oriented5, the Rich library6. Scripting language7, glue language, because Python can make a variety
SYS.ARGV command parameter list, the first element is the path of the program itself
Sys.exit (n) exit program, exit normally (0)
Sys.version get version information for Python interpreter
Sys.maxint the largest Int value
Sys.path
3 5 1) 6 21) First: Find the largest of these numbers and put it at the end.3, 5 Find a large number in the second position5, 1 Find a large number in the third position5, 6 Find a large number in the fourth position2, 6 find a large number to
"Getting Started" is a good motivation, but it may be slow to play. If you have a project in your hand or in your head, you will be driven by the goal instead of learning as you learn the module.In addition, if every knowledge point in the knowledge
When learning the Python adorner decorator, I encountered *args and **kw two function values passed.To define functions in Python, you can use general parameters, default parameters, non-keyword parameters, and keyword parameters.General parameters
Python3 File First, the basic incoming parameters of the method are affixed:def Open (file, mode='r', Buffering=none, Encoding=none, Errors=none, newline= None, Closefd=true) In the actual operation, we are more commonly used are files,mode and
1. Install PythonWindowshttp://www.python.org Download Python installation packagesuch as Python-2.7.12.msi performing the installationAfter the installation is complete, search program and file->cmd->pythonAppear"" Python 2.7.13
1, go to the space and special symbolsCopy the code code as follows: S.strip (). Lstrip (). Rstrip (', ')2. Copying stringsCopy the code code as follows: #strcpy (SSTR1,SSTR2)SSTR1 = ' strcpy 'SSTR2 = SStr1SSTR1 = ' Strcpy2 'Print SSTR23. Connection
In this section we will show you how to use
Python Languageto encode and decode
JSONObject.
JSON (JavaScript Object Notation)is a lightweight data interchange format that is easy for people to read and write
The json.loads is used to decode JSON
In this article, let's look at the python
Tell Method, before we enter the article, we first need to know
Pythontell ()What is it
Tell ()It can be used in Python programming where it can play a role. These things we can all learn in today's article.
In the previous three articles, we described in detail
Python MySQL DatabaseThe creation and use of the method, but in practical problems, it is also necessary to
MySQL Delete all lists under library, this article, as an additional article in the
What's good about Python programming in the previous article? Learn about the hottest Python CGI programming of the moment we have a brief introduction to what is
Python CGI programming,This article is an in-depth understanding and
Python CGI
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