1. Install setuptools (download link can be found from https://pypi.python.org/pypi/setuptools#code-of-conduct)#Download setuptools-25.1. 6 --no-check-certificate https://pypi.python.org/packages/1f/7a/ 6b239a65d452b04ad8068193ae313b386e6fc745b92cd4
A. functionA function is a function block that executes successfully or is required to inform the caller by the return value.1. Function definitiondef function name (parameter)......function body......return valueA. Creating a function with the DEF
Function:1. Definition and use:def function name (parameter):...function body...return value##def: A keyword that represents a functionFunction names: functions name, call function according to function nameFunction Body: A series of logical
Python personal notes, easy to query, unrelated to infringement.Definition of function: def test (): print "hello world!" Test () #调用上面的test函数 Define a function with the parameter name: Def mingzi (name): print "Hello %s,how old are
Python personal notes are purely convenient to query.-----------------------Python exception handling-------------------------try: Name=[' A ', ' B ', ' C '] name[3]except indexerror: print ' You list is out of range .... '
Today's learning Record:Chicken Soup of the Soul:To have the right goals, a goal to achieve a goal, avoid ambitious;The best investment is to invest in yourself;Realize your DreamsStudy, study, and learn;Talk is cheap.In terms of itself, more than 30
I. Extension methods for classes 1. Static methodsSyntax: @staticmethod, a static method cannot access a public property and cannot access a class. Can be called directly after instantiation, and in the method can be invoked by self. Invokes an
The modules learned:Import OSImport SysImport GetpassOs.system ("Df-h")Cmd_res = Os.system ("Df-h")Print (Cmd_res) is 0 because the result is 0, if you want to see the result, use the following notation:Cmd_res = Os.popen ("Df-h"). Read ()Os.mkdir ("
Enumerate () enumeration functionExample: For Index,key in Ennumerate (Menu.keys ()):Print Index,keyFor I in Enumerate (range (1,10)):Print IOutput result: (0,1) .... (9,10)Os.popen () to save the resultsOs.popen ("dir"). Output from read ()
List method:L.append (Var) #追加元素L.insert (Index,var)L.pop (Var) #返回最后一个元素 and removed from the listL.remove (Var) #删除第一次出现的该元素L.count (Var) #该元素在列表中出现的个数L.index (Var) #该元素的位置, no exception thrownL.extend (list) #追加list, that is, merge list to
Python Standard exceptionException Name DescriptionBaseexception base class for all exceptionsSystemexit Interpreter Request ExitKeyboardinterrupt user interrupt execution (usually input ^c)Exception base class for general errorsStopiteration
Title Address: http://ctf.idf.cn/index.php?g=game&m=article&a=index&id=45Download to discover is CRACKME.PYCYou can use Uncompyle2 to decompile. You can also directly http://tool.lu/pyc/on this site to decompile.Get the source code:1 #!/usr/bin/env
First python refers to AES encryption from Crypto.cipher Import AESNeed to install the Crypto module, you can use the Easy_install installation will automatically go to the official website for the search installationWhere code example:AES
Python has a lot of special methods like __del__ (self), some such as __gt__ (), __le__ () and so on can be guessed from the name of its approximate function, but some can not be so random guessing (of course, it is possible that I alone will do),
Basic idea of inserting sort:
Each step inserts a record to be sorted by the size of its key value into the appropriate position in the previously sorted file until all is inserted.
Cases:
arr = [49,38,04,97,76,13,27,49,55,65], from the 2nd
Ask questions in doubtThe day before yesterday colleagues asked me a question, why the script does not call a __init__. The script is as Follows:1 classA (object):2 def __init__(self, *args, * *kwargs):3 Print "call Init
Python beginners encountered problems 1 and 2. python beginners encountered problems
This article is just the most basic part of Python. If you have already had python experience, even a little bit of experience, you may have encountered it, but I
Python data type --- list 3, python Data Type
1. determine whether an element exists in the list: "in" Usage
List = ['frank', 99, 'is ', 78, 4, 'smart'] print (99 in list) print (9 in list) # running result TrueFalse
2. Statistics on the number of
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