#!/user/bin/python3#files: using_sys.pyf = open ("Filename.txt", "r+")num = F.read ()F.close ()Lstnum = Num.split (' \ t ')A, b = Int (lstnum[0]), float (lstnum[1])Print (Type (a), type (b))Print (A, B)RET = A * * bPrint (ret)Reads cardinality A and
The contents of this chapter:
List & Tuple actions
String manipulation
Dictionary operations
Collection operations
File operations
Character encoding and transcoding
The Python language has never been so
@decorator can dynamically realize the increase of function function, however, after @decorator "transformation" function, compared with the original function, there is no other place than the function of a little more?In the absence of decorator,
ObjectiveQ: How does Python get a column value in Excel to Parameterize in a script recorded with selenium, such as how to parameterize a login user name and password?A: You can use XLRD to read the contents of Excel for parameterization. Of course,
ObjectiveThere are a lot of small partners in the 163 as a login case, found that no matter how positioning can not locate, what is the ghost, this article details the IFRAME related switchTake http://mail.163.com/login page for the case, detailed
Learning content:Python Module Introduction1. Classic class or new type2. Abstract interface3. Static methods, class methods, property methods4. Reflection5. Exception Handling6, socket programming first knowledge7, using the socket to achieve get,
ObjectiveA small partner in the script to launch the browser when the original downloaded plugin is missing, unable to use Firebug on the open page to continue to locate page elements, debugging
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/8B/14/wKiom1hD7wCwA0Q-AAE4A3J2jJc744.png "title=" 1.png " alt= "Wkiom1hd7wcwa0q-aae4a3j2jjc744.png"/>1. Constants and variablesconstant : Once assigned, it can no longer be changed, in other
Objective in 17 we talked about the parameterization of Excel data, someone asked the TXT data parameterization what to do, the following small series for you to take your TXT data parameterized explanationFirst, Baidu search As an example,
Directory:
Socket syntax and related
Socketserver for multiple concurrency
Socket concept:The socket is essentially a channel between 2 computers connected to each other. Two computers through this channel to achieve the transmission of
ObjectiveNot all pop-up boxes are called alert, and before using the alert method, you need to identify whether it is alert or not. First recognize what the CHU alert looks like, the next encounter, you can use the corresponding method to solve.The
Description: Usually often encounter time conversion, one after another to hit the format of the characters, and query some, collation as follows.
Format Code table:
%a: Shorthand for the day of the week. (Mon-Sun)%A: The day of the week is
Python's functions can not only return data types such as int, str, list, dict, but also return functions!For example, to define a function f (), we let it return a function g, which can be written like this:def f (): Print ' Call f () ... ' #
The basic idea of quick sorting:
By sorting the sorted data into separate two parts, one part of all data is smaller than the other part of the data, and then the two parts of the data are quickly sorted by this method, the entire sorting process
Generate two-dimensional code via QRCode
The code for the online tutorials can be used
Simple Rough
Import qrcode img = qrcode.make (' http://lizhiyu.iteye.com/blog/2331662 ') img.save (' test.png ') Add parameter Control Python code import
0 basic situation, learning a language to enrich themselves, Python, concise, beautiful, easy to use, is a good choice. So how do you learn python in a systematic way?
Some people very want to learn python, on the one hand is trivial entanglement,
Python requests installation, pythonrequests
In windows, you only need to enter the command pip install requests to install it.
In linux, you only need to enter the command sudo pip install requests to install it.
Or
========================
[Terry Notes] python FTP, terrypython
The following is a job, using python as an ftp, mainly using socket.
The server runs in linux, and the client can execute shell commands (static)
Enter get xxx on the client side to download the file.
Input put
Python sample code for capturing mobile phone number home location information, python sample code
Preface
This article describes how to use Python to capture mobile phone home location information. The detailed sample code is provided in this
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