ObjectivePython version: 3.6.2I. INPUT and OUTPUT1. Output:Use print () to output the specified content.The content in parentheses can be a string:Print ("hello,world")can also be a comma "," separated by a number of strings, when the comma is
Firefox (high version to install the replacement Firefox driver, version 47 below does not install)Googlechrome (need to install browser driver plug-in, drive to selenium official website download, currently the browser driver only 32-bit, so Google
# # Enter Name# #name = input (' What's Your name ')Name = ' Stan '# test for If,elifIf name = = ' Stan ':Print (' 1. Yes, your is Stan ')Print (' Here is if ')elif name = = ' Vanees ':Print (' 2. Not Stan, Vanees ')Print (' Here is Elif ')ElsePrint
Python has two major versions, 2 and 3, respectively.: Python-3.6.2 Python-2.7.13Now installation path: D:\Program Files\pythonInstall pip-9.0.1 after installation is completeThe pip file is the tar.gz type, unzip it, and enter the directory to
Import turtleturtle.shape (' Turtle ') turtle.speed (5) turtle.color (' green ') var=1while var = = 1: For I in range (5): Turtle.forward (turtle.right) (144) Infinite loop of the pentagramFrom Turtle Import*for I in range (5
Python level Three menu
Demand
Print provincial, city, and county level three menus
Can return to the upper level
Can exit the program at any time
Code implementation
1menu = {2 'Beijing':{3
#-*-coding:utf-8-*-names= ["AA","BB","cc","DD",]" "Enquiry" "#slicesPrint(Names[1:3])#take the last elementPrint(names[-1])#take all elements after the second elementPrint(names[2:])" "Add" "#append a single elementNames.append
collection, which is almost the same as the list, except that it has no duplicate values, and in the list it can have a phaseThe same value, and the collection is not allowed, if you execute the following code, you will find that B removes the same,
When the server has not yet deployed the application, and if you want to verify that the network is turned on, we can first impersonate the port on the server to enable the application, and then telnet the port from somewhere else to verify the
The automation use case is executed by the program, so sometimes the error message printed is not clear, if the script execution error can be saved to the current window, then through the picture can be very intuitive to see the cause of the error.
writing the first Python program How to write a Python program 1
Open HyperTerminal2. Enter python3 , enter the 3rd version of the Python programming language used by Python3, and if you enter only Python, the 2nd version of Python is used.3.
Recently to a series of data to do comparison, need to use numpy and pandas to calculate, the following this article mainly to you about the Python learning tutorial numpy and pandas use of related materials, the text through the sample code
Python file operations-merge text file content and python text files
Currently, a large number of functions are used: the content of multiple small files is merged into a unified file, and the original file is renamed to mark that it has been
Common encoding and decoding scripts
We usually encounter various encodings. Here, I have summarized some common encodings, which are not very complete.
I tried to make a summary of encoding and decoding, and wrote a script. As python is not very
Python object-oriented,1. Object 1.1 Polymorphism
This means that the same operation can be performed on objects of different classes.1.2 Encapsulation
Working details of hidden objects in the external world1.3 inheritance
Create specialized class
Python -- re module and regular expression, pythonreI. re Module
Common Methods in re Module
Additional:
Almost all methods in the re module carry the flags parameter. flags indicates the matching mode, which may include:
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.