Based on my learning experience, I have summarized the following ten points to share with you:
1) The first step to learn python is to download a Python version from www.python.org. I recommend that you do not download an integrated development
A good integrated development environment can greatly improve programming efficiency. Therefore, I need to first find a good python development tool.
Eclipse + pyDev, I feel pretty good. I will record the key points of the installation process in
Recently bored, I got a furture of visual studio 2005 and found that there is more support for dynamic languages. in fact, it was a very early opportunity to try python. I first wanted to learn ironpython, but later I found that I still want to
Share your code
Python provides a set of technologies that can be easily shared, including modules and some release tools:
The module allows you to work together to organize code for optimal sharing.
Release tools allow you to share your modules
We need to develop python. I think it is necessary to understand the code style in python.
This is good for ourselves and the code they write.
Below are eight important code style considerations:
4 spaces are a good compromise between small
During python development, you will inevitably encounter type conversion. Here is a common type conversion demo:
Below is my demo:
(, Int (234.23 (, int (, 16 (, int (, 10 (, int (, 8 (, int (, 2 (, int (23 (, float (, float (32 (, complex (12, 4
If you are not ready for the development environment, you may wish to spend a little time looking at it:
This blog is about how to operate mysql Data in python.
I made a demo:
First look at the running effect:
:
DATABASE_NAME = HOST =
I. Introduction
1. buildbot is an open-source python-based continuous integration system. It can trigger the corresponding automatic build and test run in the following three ways to quickly discover problems, at the same time, it is pointed out
In pythonModule is provided for creating temporary files (folders)
If your application requires a temporary file to store data, but you do not need to share it with other programsModule to create temporary files (folders) is a good choice
Other
Class, many methods are defined, but many methods are not implemented, which requires us to inheritClass, implement some methods by yourself, such as: # Overridable -- handle start tag def handle_starttag (self, tag, attrs): pass # Overridable --
In computer programming,Callback Function, Or abbreviationCallback(Callback) refers to the reference of a piece of executable code that is passed to other code through function parameters. This design allows underlying code calls to subprograms
In python,The module supports image formats.
This module mainly processes the formats of recognized images.
The functions provided by the module are as follows:
imghdr.what(filename, h= Tests the image data contained the file named by
For example, convert a string into a character array:TheList = list (theString)At the same time, we can easily traverse through the for statement:For c in theString:Do_something_with (c)Even more, use the following statement:Result =
Note that an array of characters is passed in. the compiler removes all corresponding characters at both ends until no matching characters exist, for example:Copy codeThe Code is as follows:TheString = 'saaaay yes no yaaaass'Print theString. strip ('
For example:>>> Print ord ('A ')97>>> Print chr (97)ANow we can start designing our case-insensitive Conversion Program:Copy codeThe Code is as follows:#! /Usr/bin/env python# Coding = UTF-8Def UCaseChar (ch ):If ord (ch) in range (0, 97,122
Copy codeThe Code is as follows:MulLine = "" Hello !!!Wellcome to Python's world!There are a lot of interesting things!Enjoy yourself. Thank you! """Print ''. join (mulLine. splitlines ())Print '------------'Print ''. join (mulLine. splitlines (True
Static local name DetectionWhen Python detects local scopes: It detects code compilation in python, rather than assigning values at runtime.Under normal circumstances, the name that is not copied in the function will be searched in the module
1. pickle
Write: open a file descriptor in write mode and call pickle. dump to write the objectCopy codeThe Code is as follows:Dn = {'baidu': 'www .baidu.com ', 'qq': 'www .qq.com', '000000': 'www .360.cn '}
Name = ['mayun ', 'mahuateng', 'liyanhong'
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