Recently began to play Python, with it to write some small program game auxiliary, now do the summaryEnter the text below.This article applies to the WIN10 system, Android users. The goal is to have a small partner with no contact with Python to run
This article about multithreading tools, is very suitable for novice learning, tool efficiency is also very high, the code is relatively perfect, title.
This article I spring signed writer--aedoo
0x00 PrefaceI published the original
First, commentsSingle line comment (line comment)Start with # and the right is the explanatory text#+ Comment ContentMultiline comment (block comment)‘‘‘Name2=namePrint (' My name is ', name2)‘‘‘Second, arithmetic operators1. OperatorsPS in Python *
Property built-in adorner functions are used only in object-oriented fromMathImportPiclassCircle:def __init__(self, R): SELF.R=R @property#Some methods that have similar properties that require manipulation are disguised as object properties
What to learn:
Computer History
Linux commands
ComputerComputer), commonly known as computer, is a high-speed computing computer, can be used for data processing, data statistics, numerical calculation, logic calculation, with
Python has a way to convert any value into a string: pass it to the REPR () or str () function.The function str () is used to convert a value into a form suitable for human reading, while REPR () translates into a form for the interpreter to read(if
def diff (Lista,listb): #求交集的两种方式 Reta = [i-I in ListA if I in Listb] Retb = List (set (ListA). Intersection (Set (LISTB))) Print "Reta is:", Reta print "Retb are:", retb #求并集 retc = List (set (ListA))) print "Listb is:", retC1 #求差集, In B but not
17dayFunction1. Function definition:A function is a collection of a set of statements encapsulated by a name (function name), to execute the function, simply call its name2, the function of the characteristics:A reduce duplicate codeb makes the
#one interface, multiple implementations#implementing the reuse of interfacesclassAnimal:def __init__(self, name):#Constructor of the classSelf.name =namedefTalk (self):#Abstract method, defined by convention only Pass #Raise
#函数即变量 # len type print input str # Print (All ([1, 2, 3, 4]) # to determine whether the values inside an iterated object are true # print (Any ([0, 1, 2, 3, 4]) # To determine if the value inside the iterated object has a true # print (Bin (100
NamedtupleNamedtuple is a built-in type of system that inherits from a tuple in the collections module.How to use:collections.namedtuple (typename,field_names[, verbose=false][, Rename=false])namedtuple Returns a subclass of tuples named with
Python IntroductionThe founder of Python is Guido van Rossum (Guido van Rossum). 1989 Christmas period, Guido van Rossum (Chinese name: Uncle Turtle) in order to pass time in Amsterdam, determined to develop a new script interpreter, as an
Python _ loop (iteration) and python Loop
# For and while
# For is used for iterative processing. What is iteration? When you don't see this word, for is to process a bunch of things one by one, for example, to eat a bag of peanuts, You have to peel
Python-based basic linux commands, pythonlinux# Pwd viewing the current directory/root directory is equivalent to windows 'computer '# cd (change directory) change the directory # ls view the file ls file name under the current directory view 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