Created on June 6, 2017 @author: louts1th Session Work 10minutesDisplay page, only login to display, not logged in will pop up a login box, is a masking layer2nd Course Automation Road and CMBD status 22minutes cmdb: automatic installation
The "1" getattr () function is Pythonthe core function of introspection"2" Python'sIntrospection: Python can view functions or module information stored as objects in memory, as well as related operations. "3" Related functions: GetAttr (), SetAttr (
One input and outputPython3 Unity is input,python2 in the raw_input equivalent to the Python3 input, in addition Python2 also have input1.res=input ("Python3:")2.res=raw_input ("Python2:")3.res=raw_input ("Python2:")No matter what input is received,
The history of programming languages and the development of Python one. programming language 1. Programming language is also "language" with English, Chinese and other similar, mastering its grammatical structure, flexible use of its grammatical
There is a concept in Python called module, which is similar to a header file in C and a package in Java, such as calling the SQRT function in Python, which must be introduced into the math module with the Import keyword. Here's a look at the
After @staticmethod decoration, the methods in the class are converted to static methods1 class A: 2 3 @staticmethod 4 def B (self): 5 Print (')A static method cannot access an instance variable or a class variable, which is
The module introduces the common methods of OS module OS.GETCWD () #获取当前工作目录os. Listdir ("f:\\") # Gets all files and directories under the specified directory Os.remove (' B.json ') #删除指定文件os. Stat (' A.json ') # Get file
One, TXT file saved in utf-8 format, etc., how to remove BOM headerThe TXT file of the Windows system is saved by default at the beginning of the file by inserting three invisible characters (0xEF 0xBB 0xBF), called the BOM header, which are already
ID3 algorithm for decision tree---Decision Tree:Take the training data of the weather database as an example.
Outlook
Temperature
Humidity
Windy
Playgolf?
Sunny
85
85
FALSE
No
The range of int python2: On a 32-bit machine, the number of integers is 32 bits, and the value range is -2**31~2**31-1;On a 64-bit system, the number of integers is 64 bits and the value range is -2**63~2**63-1;python3:Theoretically the length is
In Python it is stated that a two-dimensional array can be sized with a for-I in range (x) so that it can be the same as the implementation-defined array in C, and that the array in the function is not required to be modified if it is to modify the
1. String manipulationThe string can be evaluated by subscript, but because the string is an immutable variable, the value cannot be modified by subscript.str = ' Lily Terry Mark 'Name[0] #获取第1个字符串值Name[0:7] #获取第1 The string value of the ~Name[:7]
Topic 1 The most kid arrayDescribe:Given an array of integers, find a sub-array with the minimum and. Returns its minimum and. PrecautionsA sub-array contains at least one numberHave you ever encountered this problem in a real interview? YesSample
#元组‘‘‘Tuples are immutable lists and cannot be changed.The same value as the list‘‘‘Tp= (a)tp1= (' 127.0.0.1 ', ' 3307 ')#元组只有count and index two methods.lis=[' 127.0.0.1 ', ' 8080 ']Tuple (LIS) #强制类型转换#字典, legends are important.#字典里的KYE不能重复info={'
The function body contains the yield keyword, and the result of the function is the generator objectThe essence of the builder object is the iterator, so the yield function is1. Make an iterator to the execution result of the function2. Multiple
Get the source code. The following packages contain the source at the same revision as the above binaries:
PYPY-2.3.1-SRC.TAR.BZ2 (sources, Unix line endings)
Pypy-2.3.1-src.zip (sources, Unix line endings too)
Or you
Regular expression processing text like a blast sweeping the autumn leaves, most programming languages have built-in support for regular expressions, which are used in scenarios such as form validation, text extraction, substitution, and so on. Here'
One: string manipulation1. The string can be evaluated by subscript, but because the string is immutable, it cannot be modified by Subscript.Username = ' Li ' username[0]2.The For loop in python, each time the loop is looped, each element inside the
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