1. Slave;
2. Download eclipse from http://www.eclipse.org/downloads/Classic version and decompress it;
3. Slave;
4. Open eclipse, help à installNew software ..., Click Add ..., Enter pydev in name, http://pydev.org/updatesin location, click OK, wait for download, select pydevFor eclipse à next, (I do not know why it will wait for a long time. To cancel this step, use the second method );
5. Slave;
6. Copy the pydev2.7.1/features and pydev2.7.1/plugins
Python basic learning notes 2, python basic learning notesDictionary
A dictionary is similar to a list and can store multiple elements. Objects storing multiple elements are called containers );
Common ways to create a dictionary:
>>>dic = {'tom':11, 'sam':57,'lily':100}>>>print type(dic)
Similar to a table, each element is separated by a comma. Each element cont
Python notes: First Article (2): First recognition list and metadata, first article in python
In Python, the list and element group are a Data Structure: A sequence. Each element in the sequence is assigned a sequence number. The position of the element, the position of the first original element is 0, and so on. Seque
([start], stop[, step]), which gets a random number from the specified range, in the collection incremented by the specified cardinality.such as: Random.randrange (10, 100, 2), the result is equivalent from [10, 12, 14, 16, ... 96, 98] gets a random number in the sequence. Random.randrange (10, 100, 2) is equivalent to Random.choice (range (10, 100, 2) on the re
[Python journey] Article 6 (7): development of simple host batch management toolsWith the learning and use of the Paramiko module, as well as the multi-thread and multi-process knowledge in Python, you can develop a simple host batch management tool. Obviously, when you manage hosts in batches, it is best for programs to execute concurrently, because it can maxim
allows you to create data indexes in a custom manner.
Ii. dictionary Analysis
A dictionary can contain multiple elements, each of which is well separated;
The dictionary element consists of two parts: Key and Value. The Key is the data index, the Value is the data itself, and the Key and Value are one-to-one correspondence.
1 #! /Usr/bin/python 2 # coding: UTF-8 3 ''' 4 Created on 5 @ author: NiceCui 6 ''
File operationsWe have heard a problem, the elephant into the refrigerator divided into three steps: 1, open the refrigerator door, 2, put the elephant in, 3, close the refrigerator door. The steps of the Python file operation that we're going to talk about today are like steps to put an elephant into a refrigerator.Basic steps for manipulating files using Python
First article on the path to Python Development (2)-First knowledge list and metadata, the path to python Development
The list and element groups can be treated as normal "arrays", which can store any number of Python objects of any type. Like arrays, the list and element can be accessed through a numerical 0 index, li
Principle of Computing (Python) Study Notes (7) DFS Search + Tic Tac Toe use MiniMax Stratedy, minimaxstratedy1. Trees
Tree is a recursive structure.
1.1 math nodes
Https://class.coursera.org/principlescomputing-001/wiki/view? Page = trees
1.2 CODE tree without parent domain
Http://www.codeskulptor.org/#poc_tree.py
class Tree: """ Recursive definition for trees plus various tree methods """
Python [2]-list and metadata, python listI. Sequence
Python contains six built-in sequences: List, tuples, strings, unicode strings, buffer objects, and xrange objects.
The list can be modified, and the tuples cannot be modified.Ii. List
The list is a variable-length sequence, and its content can be modified. Sequences
Python index)Vi. XPath: logical operation? 1.xpath There is also a relatively strong function, can be multiple attribute logical operation, can be supported with (and), or (or), non (not)? 2. The more commonly used is the and operation, while satisfying two propertiesVii. XPath: Fuzzy matching? 1.xpath also has a very powerful feature, fuzzy matching? 2. Mastere
(1) Perform installation Python-2.7.10.exe (this is a 32-bit package, found that the 64-bit package will conflict with many software, cannot find the path. And note the last installation option when installing, select automatically modify path)Download the software here http://www.scipy.org/scipylib/download.html(2) Perform installation Numpy-1.9.2-win32-superpack-python2.7.exe(3) Perform installation Scipy
Writing high-quality code-suggestions for improving python programs (2), high-quality python
The original Article is published on my blog homepage. For more information, see the source!
Recommendation 7: Use the assert statement to discover problemsAssert exists in many languages and is mainly used for debugging progra
Cycle:The execution of a piece of code repeats n times until a certain condition is met.In order to stop repeating execution at the appropriate time, the program needs to have a condition that satisfies the stop loop.There are three loops in Python (only two of them are in essence):While loopFor loopNested loopsBreak #完全结束一个循环本身Continue #停止当前循环体的执行 (equivalent to ignoring the statement behind continue) to begin the next loop body;While Loop #表达式为true,
Have time system read the Python study manual and record some easy-to-forget points1.python function High Polymerization low coupling1) Use parameters for input and return for output2) Use global variables only when it is really necessary3) do not change the parameters of the mutable type unless the caller wishes to do so4) Each function should have a single, unified goal5) Each function should be relativel
27. Properties of the __DICT__ System 1) object may come from:
The definition of its class, called the Class attribute
Inherit the definition of the parent class
The object instance definition (assigned value when initializing the object), called the object property
2) The properties of the object are stored in the object's__dict__In the properties:
__dict__ is a dictionary, the key is the property name, and the value is
--------------------------------------------------------------------------------1. Iterator protocolAn iterator protocol is an object that must provide a next method that either returns the next item in the iteration, or causes a Stopiteration exception to terminate the iteration (only backward cannot go forward)2.python ' in for loop mechanism1. Turn them into an iterative object by calling The. __it
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.