Recommended for Yyuu/pyenv GitHub, which allows you to install as many Python versions as you like without modifying your system's own python, and that the versions are isolated from one another, and are easy to manage in multiple versions.pyenvCan
Recently in the study of Python, purely their own interests, but did not systematically read the Python programming books, feel that the above description is too cumbersome, in the site to find some learning site, found Liaoche Teacher's website
The __init__ () function in a subclass of Python overrides the function of the parent class, and in some cases it is necessary to call the parent class function in the subclass.In the following routines,??? is where the parent class function needs
1.Python Variables if a single-valued variable is called a one-dimensional variable, and the variable that can extend the element is called a multidimensional variable, the python variable can be divided as follows:
Variable dimension
While loop syntax structure you can use the while loop while the Expression:while_suite statement while_suite the continuous loop execution until the value of the expression changes to 0 or false when the statement is repeated repeatedly.# !/usr/bin/
XlrdXlrdXLRD module for reading the contents of an Excel fileBasic usage:Workbook = Xlrd.open_workbook (' file path ') workbook.sheet_names () # returns the list of all sheet workbook.sheet_by_index (...) # Index to obtain a sheet object,
GeneratorThe result is saved to the state of the generator, and the yield in the normal function becomes the generator.1. Xrange in Python 3.3 has been merged into range.1 i = range (2)print (i)34 =>range (0, 10)2. Yield generator.1 deffunc ():2
Learning Python is the same. The most convenient way to start learning a new language is to imitate and then innovate in imitation. In the early imitation of the process, it is important to do to personally knock down each line of code, play every
Summarize the built-in functions, build-in function.
First, the mathematical operation class
ABS (x)
Seek absolute value
Complex ([real[, Imag]])
Create a complex number
Pmod (A, B)
Separate fetch and
This article shares a detailed description of the Python ternary operator in detail
Python does not have a ternary descriptor, but it can be implemented by simulation.One of these is:
(X and V1) or V2
Normally there is no mistake, but the
Step: Open File-"Action file-" close file
Open File
File handle = open (' File path ', ' mode ')
Specify file Encoding
File handle = open (' File path ', ' mode ', encoding= ' utf-8 ')
To prevent forgetting to close a file, you can use the
S1=set ([11,22,33,44, ' Tom ', ' Tony ', 11,77,2.5,]) returned {11,22,33,44, ' Tom ', ' Tony ', 77,2.5} (Note: The return is not a dictionary, Just tell you that this collection contains these elements, so the order of the result elements returned
A Software and Environment
(1) installation date 2016/12/23;
(2) raw material VS2013,cuda-8.0(preferably download cuda7.5, currently theano-0.8.2 support for cuda-8 is not very good),anaconda3-4.2.0( in a position);
(3) the environment is
Summarize the recent temporary data transfer.
There are three ways to http://www.php.cn/wiki/422.html "target=" _blank ">cookie,session,cache
First of all, what would be the choice for me, the cookie will be understood on the line, I am not used,
Python Utility library: prettytable Learning
Prettytable description
Prettytable is a third-party library in Python that can be used to generate beautiful, ASCII-formatted tables that are useful.The following is an official introduction:
A
Python arithmetic operators
#!/usr/bin/env python#-*-coding:utf-8-*-a = 21b = 10c = 0 c = a + bprint ("1.c value is:", c) C = A-bprint ("2.c value:", c) c = A * Bprint ("3.c value is:", c) C = A/bprint ("4.c value is:", c) C = a% bprint ("5.c
Introduction
The purpose of this article is to show you how to use pandas to perform some common Excel tasks. Some examples are trivial, but I think showing these simple things is just as important as the complex features you can find elsewhere. As
Python3 file operations,
Step: open the file, operate the file, and close the file.
Open a file
File handle = open ('file path', 'Mode ')
Specify file encoding
File handle = open ('file path', 'Mode', encoding = 'utf-8 ')
To avoid forgetting to
Python3.5 + PyQt5 + Eric6, a calculator code, pyqt5eric6
Currently, simple computing can be implemented. Reset before calculation. The default number during design is 0. After learning for half a day, we made such a result, with many bugs. Python3.5
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