# 1, write a function, batch generation of some registered use of the account: The resulting account is the end of @163.com, the length of the user input, the number of entries generated by the user input, the user name can not be repeated, the user
1. Import the code from the lib.py into the index.py, and then use the lib.py code:A. pyc file, the bytecode file, is generated after the import.2. InterpreterUse Python to execute the hello.py script.3, the basic knowledge of codingUnicode is the
Download the Python 3.x installation packageThe default Linux installation package can only be a source installation:>> wget HTTPS://WWW.PYTHON.ORG/FTP/PYTHON/3.6.1/PYTHON-3.6.1.TAR.XZDue to the end of XZ file, you can use the following command to
Python string: Part 1----String: A collection of ordered characters1, single and double quote strings are the same, single quotes embedded in double quotation marks or double quotation marks embedded in single quotation marks, single quotation marks
Django Request life cycle:-->url (matching), view function, return user string-->url (matching), view function, open an HTML file, read the contentCreate a Django ProjectDjango-admin Startproject MySiteCD MySitePython manage.py Startapp
In the 01 knapsack problem, choose whether to add an item to the backpack. It is necessary to compare the solution of the sub-problem of the item with the solution of the sub-problem of the item, which leads to a lot of overlapping sub-problems,
Before using Python to solve the problem, let's say, what is the factor decompositionThe so-called factor decomposition is the first to find the number of all the approximate (approximate: A%b = = 0, that is, a can be divisible by B)For example: 20
This article mainly describes the python merge text file example, the need for friends can refer to the following
Python implements two text merges
Work number and name are recorded in the employee file
Cat employee.txt:100 Jason Smith200 John Doe30
This article mainly describes the collection of some of the python common methods and techniques, this article explains three ways to reverse the string, four ways to traverse the dictionary, three ways to traverse the list, dictionary sorting
This article mainly introduces Python common tips, examples of Python on the dictionary, string, random numbers and other operational skills, very simple and practical, the need for friends can refer to the next
The examples in this paper summarize
For all Web applications, essentially a socket server, the user's browser is actually a socket client.
A simple Web application:
#!/usr/bin/env python#coding:utf-8 Import Socket def handle_request (client): buf = Client.recv (1024x768) Client.
Null (None)
None can be used to indicate that a variable has a missing value, similar to null in other languages.
Like the other null values: 0,[] and the empty string, the Boolean variable gives false instead of true.
If None:print ("None got
use of R Ange
Function prototypes: Range (start, end, scan):
Parameter meaning:
Start: Count starts from start. The default is starting from 0. For example, range (5) is equivalent to range (0, 5);
End: Technology ends with end, but does not
Python Study Notes Day2, pythonday2
1. Import the code in lib. py into index. py, and then use the lib. py code:
After the import, A. pyc file is generated, that is, the bytecode file.
2. Interpreter
Execute the hello. py script in python.
3
Python crawler practice: 2017 ranking of the best universities in China, python7 7
Capture content:
Capture the top 10 university rankings, university names, and total scores from the best universities in China, and align the data in the
Install Beautifulsoup and beautifulsoup1. Obtain the Tag1.find _ all method (1) find_all (name = 'tag _ name', attrs, recursive, text, ** kwargs)
Name: The name corresponding to the tag. When multiple tags are included, a list is returned. You can
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