I. Variables and definitions:Variable definition: A space stored in a specific area of memory, in Python the variable name does not have a type, the Reference object has a type of point;Naming rules: Letters or underscores begin with, and cannot
Math-related
ABS (a): Calculate absolute value
Max (list): Fetch the list maximum value
Min (list): The list minimum value is obtained
SUM (list): Takes the sum of the list element
Sorted (list): Sort, returns the sorted
There is no shortage of humor in the Python community. First look at the poem "The Path of Python".Import this package:Import thisThe output is a poem,This poem summarizes the Python style and can guide the programming of the Python program ape.Here
Tuples: Ganso is immutable After the definition is irreversible, the properties of the tuple cannot be modified create a tuple:------------------------------------------------------------------------------------------------ ------tuple1= (1,2,3,4,5,6
Module: is essentially a. py fileModules are divided into three parts: built-in modules, third-party modules, custom modulesOne, Time module1. Time representationIn Python, there are typically three ways to represent time:(1) timestamp (timestamp):
First section Python file types
Source
Python source files with "py" extension, interpreted by the Python program, do not need to compile
BYTE code
Python source files are compiled with a file with the extension "PYc"
Compilation
One, top 3,000 people list page
2) Analysis page structure: Each TD is, a person.
First small to rank
The second a tag is the nickname and Username, and the home page's blog address. User name interception by address acquisition
The fourth small
Continuing with the previous article, the URL manager and the downloader have been written in the previous article. Next is the URL parser, in general This module is more difficult in several modules. Because after downloading the page through the
because of the cause of work, learning has stagnated for a long time, also lag a lot. Really, learning to insist on is very important, we are surrounded by too many temptations, any difficulties can become a reason to give up. Let oneself always
The Python Excel operation requires an additional download of the XLRD and XLWT packages that correspond to the Python version for reading and writing to Excel.
Installation method: Directly after decompression, in the character command interface
Before I learned Alex's Python tutorial, Alex's teaching was really great and humorous. Hey. I hope I can stick to it.
To review the basic knowledge of the previous study. Hope that they can learn python on the road farther and further away, we one
Learn python basic syntax try to write a simple Python program
1 count = 0 2 age_to_guess = 3 4 while count Age_to_guess:10 print ("Too Big ") One else:12 print (" Too small ") count = Count + if count = = 3:15
The module is essentially a. py file, which you can see under the Lib folder in the installation directory
Modules are divided into three parts: built-in modules (in the interpreter), third-party modules (under Lib folder), custom modules (defined
I. Generators and iterators
1. Generator
The generator has the ability to generate, which simply represents the ability to generate, and when we need to use it, it is generated through an iterator. Because he only represents this ability to generate,
Max (x, y, z, ...)The Max () method returns the maximum value for a given parameter, which can be a sequence. Returns the maximum value for a given parameter. An x, y, z numeric expression.Instance1 #!/usr/bin/python2 3 Print "Max ( +, +):", Max (80,
Python Series 6 object-oriented, python series object-orientedDirectory
Generator and iterator
String formatting
Built-in function vars
Reflection
Object-Oriented Programming
I. Generator and iterator
1. Generator
The generator has a
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