I. Function return value1. If a function returns multiple values, he will put these values in a tuple2. You can also use multiple variables to receiveReturns multiple values put into tuples inside def say (): num1=1 num2=2 num3=3
First, ListThe form of a list is denoted by [], [] There are ', ', ' separate list contents. Lists can also be nested.Syntax: eg.name1 = [' 1lo ', ' 2ng ', ' 3er ', ' 4long '];Print (NAME1);Print: [' 1lo ', ' 2ng ', ' 3er ', ' 4long ']Insert, add,
Installation pathAccording to [1], the installation path is:
PyPI or other index address. PyPI is the most common and default package index, and everyone can get packages and upload their own packages. The other index address can be a
Basic file Operation:m = open (' Words ', encoding= ' Utf-8 ') #打开文件 (python default character set is utf-8,windows to GBK), no input mode defaults to R modePrint (M.read ()) #读文件Print (M.readline ()) #读取第一行Print (M.readlines ())
Unicode string: GB2312 encoding for Chinese generated Python internal encoding is Unicode encodingUnicode usually uses two bytes to represent a character, the original English encoding from a single byte into a double-byte, only need to fill the
XML file Move.xml to parse:war, thrillerDVD2003PG10talk about a Us-japan waranime, Science fictionDVD1989R8a schientific fictionanime, actionDVD4PG10vash the Stampede!ComedyVHSPG2viewable boredomParsing the XML file for
Pythondictionary (Dictionary)A dictionary is a mutable container model and can store any type of object.Each key value key=>value pairs, with colons : Split Each key-value pair is separated by a comma,The entire dictionary is included in curly
Methods of HTTP protocol and requests libraryThe main method of the Requests library: Requests.request () constructs a requestRequests.get () Gets the main method of the HTML page, which corresponds to the get of the HTTPRequests.head () method to
Errors/anomalies occur during automated test execution, such as when the test script does not find the corresponding element, and the nosuchelementexception exception is thrown immediately. Do not be afraid at this time, must be test script or test
Read the metaprogramming of fluent Python, and summarize the impressions that have been made after reading.The first is about 4 protocol for object property accessAccording to understanding can be divided into__getattribute__And__getattr__ __setattr_
One, Time moduleLet's start by introducing some of the time-representation methods you'll use.(1) Timestamp: Refers to how many seconds have elapsed since the beginning of the Unix period, such as the first article of the result;(2) Time tuple: In
This article mainly introduces the use of Python using the OPENPYXL library to modify the Excel table data method, has a certain reference value, now share to everyone, the need for friends can refer to
1, OPENPYXL Library can read and write xlsx
This article mainly introduces the Python read/write/append Excel file demo, has a certain reference value, now share to everyone, the need for friends can refer to
Python operates the three Toolkit for Excel as follows, note that only. xls cannot
This article mainly describes the Python implementation of simple text string processing methods, involving Python for text string cutting, calculation, conversion and other related operations skills, the need for friends can refer to the following
This article mainly introduces the Python creation empty list, as well as append usage explanation, has certain reference value, now shares to everybody, has the need friend can refer to
The use of list in Python: How to create a list, how to
This article mainly introduces the implementation of Python least common multiple algorithm, involving Python numerical operations, judgments and other related operational skills, the need for friends can refer to the following
In this paper, the
This article mainly describes the python implementation of the cross-Excel worksheet sheet between the replication method, has a certain reference value, now share to everyone, the need for friends can refer to
Python, copy the Test1 Sheet1
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