First, my environmentos:64 bit Windows7Oracle Client:instantclient_11_2, in order to connect PL/SQL, only 32 ispython:python-3.5.4 32-bitcx_oracle:cx_oracle-5.3-11g.win32-py3.5: https://pypi.python.org/pypi/cx_Oracle/5.3 Download low version
Getting Started with Python basic learning three data types
Python distinguishes between integer and floating point depending on the decimal point, with the decimal point being the float type.
E notation: E is the meaning of 10, is a
Definition: A function that encapsulates a set of statements by a name (function name), and to execute the function, simply call the name of its functionsdef func (x, y): calc=x+y return calcz=func (print)(z )Characteristics:
Reduce
The main contents are:Text file read/writeParameters for Openf = open (' Test.txt ', ' R ', encoding= ' Utf-8 ') # r = Read, W = write, a = append, b = binary, + indicates that the file does not exist and is createdFile name method encoding
The traditional way to add a version number to a file link is to use Gulp-rev, and the solution presented here is to use Python instead of Gulp-rev.ImportOSImportReImportUUIDImportSYSdeffile_extension (path):returnOs.path.splitext (path) [1]basepath=
1.CPU There are two working states: one is the kernel state, the operating system is running-can operate the hardware;The other is the user state, the application software is running--can not operate the hardware.Application software to control the
#cyclic synthesis application 1.#str = "Hello,world" to invert the string to displaystr ="Hello,world"Temp="" forCinchstr:temp= C +TempElse: Print("string reversal Complete:", temp)#Circular Integrated Application 2#print 1.. An even number
1. OperatorsDefine two variables A = ten B = 20Arithmetic operationsComparison operationAssignment operationsLogical operationsMember operations2. Basic data typesint (integer)On a 32-bit machine, the number of integers is 32 bits and the value
With the tornado is really comfortable, a lot of things for you to do.But there are also unsatisfactory places--for me, a neat freak, the automatic printing of my console without my control is intolerable.Connect to a new place and if it fails,
1. Output string:Print (" string ")2. Open the document file with python :CMD Command indicatorCD C + + where cd is Chang directory Change directory, with tab key to quickly find the target fileDir View current directory file list3, thecmd
R read-only, r+ read and write, none of two created########################################W New write-only, w+ new read-write, both will clear the contents of the file(opens in W mode and cannot be read out.) w+ Readable and writable)###############
Select Sort:Thought: Each time you select the smallest value, put it in the frontCode:1A = [9,1,22,31,45,3,6,2,11]3 forIinchRange (Len (a)-1):4index = i#the lowest value of the index tag assumes that the first is the smallest value5
Python has a built-in function called REPR, which can express an object in the form of a string for identification, which is the "string representation". Repr is to get a string representation of an object by __repr__ this particular method. If
Sixth day of Python learningWrite this blog to motivate yourself and share your experiences and issues with others.First, class notes1. the method that can be invoked must be an object. 2. Basic process of file operation: open--operation--close
The Configparse module is used to parse the configuration fileConfiguration file[default]port= 3306socket=/tmp/mysql.sock[mysqldump]max_allowed_packet = 16m[myisamchk]key_buffer_size = 256Msort_ Buffer_size = 256mread_buffer = 2mwrite_buffer =
System Performance Information Module Psutil
Psutil is a cross-platform library that makes it easy to get the process and system utilization (CPU, memory, disk, network, etc.) information of the system running, mainly used for system
def fun ():For x in range (10):Yield (x*2)X=fun ()Print (Next (x))Print (Next (x))Print (Next (x))Output:014This example contains some information.1 fun () Because of yield, this function becomes a generator (generator)2 X=fun () Here is not a
System Performance Information Module PsutilPsutil is a cross-platform library that makes it easy to get the process and system utilization (CPU, memory, disk, network, etc.) information of the system running, mainly used for system monitoring,
Function (1), function (
Define functions:
# Syntax def function name (parameter 1, parameter 2, parameter 3,...): '''comment ''' value returned by return of function body # function name must reflect its meaning
Process: A function with no return
Python built-in module ConfigParser implements the configuration of read/write functions, pythonconfigparser
This article describes how to configure the read/write function using the Python built-in module ConfigParser. We will share this with you
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